Here you can find the source of startWithIgnoreCase(CharSequence str, CharSequence prefix)
public static boolean startWithIgnoreCase(CharSequence str, CharSequence prefix)
//package com.java2s; //License from project: Apache License public class Main { public static boolean startWithIgnoreCase(CharSequence str, CharSequence prefix) { return startWith(str, prefix, true); }//w w w. j av a2 s . c o m public static boolean startWith(CharSequence str, CharSequence prefix, boolean isIgnoreCase) { if (null == str || null == prefix) { if (null == str && null == prefix) { return true; } return false; } if (isIgnoreCase) { return str.toString().toLowerCase().startsWith(prefix.toString().toLowerCase()); } else { return str.toString().startsWith(prefix.toString()); } } public static boolean startWith(CharSequence str, char c) { return c == str.charAt(0); } public static boolean startWith(CharSequence str, CharSequence prefix) { return startWith(str, prefix, false); } }