Here you can find the source of startWith(char[] value, char c)
public static int startWith(char[] value, char c)
//package com.java2s; /*************************************************************************** * Copyright 2001-2006 VietSpider All rights reserved. * * Please look at license.txt in info directory for more license detail. * **************************************************************************/ public class Main { public static int startWith(char[] value, char c) { for (int i = 0; i < value.length; i++) { if (Character.isSpaceChar(value[i]) || Character.isWhitespace(value[i])) continue; else if (c == value[i]) return i; else//from w w w . j a v a 2 s . com return -1; } return -1; } }