Here you can find the source of startsWithIC(String s1, String... strings)
public static boolean startsWithIC(String s1, String... strings)
//package com.java2s; public class Main { /**//from ww w .ja va2 s . c om * Returns whether s1 starts with s2, ignoring case. */ public static boolean startsWithIC(String s1, String s2) { return s1 != null && s2 != null && s1.regionMatches(true, 0, s2, 0, s2.length()); } /** * Returns whether s1 starts with any of the given strings, ignoring case. */ public static boolean startsWithIC(String s1, String... strings) { for (String string : strings) if (startsWithIC(s1, string)) return true; return false; } /** * Returns the length of given string (supports null). */ public static int length(CharSequence aString) { return aString == null ? 0 : aString.length(); } }