Here you can find the source of startWith(String source, String target)
private static boolean startWith(String source, String target)
//package com.java2s; public class Main { private static boolean startWith(String source, String target) { if (source.length() < target.length()) { return false; }/*from w w w .ja va2 s .co m*/ String sub = source.substring(0, target.length()); return target.equalsIgnoreCase(sub); } }