Here you can find the source of startsWithPrefix(String inputText, String[] prefixes)
public static boolean startsWithPrefix(String inputText, String[] prefixes)
//package com.java2s; //License from project: Apache License public class Main { public static boolean startsWithPrefix(String inputText, String[] prefixes) { for (int i = 0; i < prefixes.length; i++) { if (inputText.startsWith(prefixes[i])) { return true; }/*from www .j a v a 2 s . com*/ } return false; } }