Here you can find the source of startsWithOne(final String src, final String[] dest)
public static int startsWithOne(final String src, final String[] dest)
//package com.java2s; //License from project: Open Source License public class Main { public static int startsWithOne(final String src, final String[] dest) { for (int i = 0; i < dest.length; ++i) { final String m = dest[i]; if (m != null) { if (src.startsWith(m)) { return i; }//from www .ja va2 s.c om } } return -1; } }