Here you can find the source of startsWithIgnoreCase(String whole, String prefix)
public static boolean startsWithIgnoreCase(String whole, String prefix)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean startsWithIgnoreCase(String whole, String prefix) { return whole.length() >= prefix.length() && whole.substring(0, prefix.length()).equalsIgnoreCase(prefix); }//from w ww . ja va 2 s . c o m public static String substring(String text, int begin, int end) { return text.substring(Math.min(text.length(), begin), Math.min(text.length(), end)); } }