Here you can find the source of startsWithAnyCS(String str, String[] needles)
public static boolean startsWithAnyCS(String str, String[] needles)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean startsWithAnyCS(String str, String[] needles) { if (str == null || str.length() == 0) return false; for (String n : needles) { if (str.startsWith(n)) return true; }/* w w w. j av a2 s. co m*/ return false; } }