Here you can find the source of startsWithIgnoreCase(String inputValue, String prefix)
Parameter | Description |
---|---|
inputValue | the input string to test |
prefix | the prefix |
public static boolean startsWithIgnoreCase(String inputValue, String prefix)
//package com.java2s; //License from project: GNU General Public License public class Main { /**//from www . ja v a 2s . co m * Tests if this string starts with the specified prefix, ignoring the case sensitive. * * @param inputValue the input string to test * @param prefix the prefix * @return {@code true} if the input string is a prefix; {@code false} otherwise. */ public static boolean startsWithIgnoreCase(String inputValue, String prefix) { return inputValue.regionMatches(true, 0, prefix, 0, prefix.length()); } }