Here you can find the source of ltrim(String list, char[] del)
private static String ltrim(String list, char[] del)
//package com.java2s; //License from project: LGPL public class Main { private static String ltrim(String list, char[] del) { int len = list.length(); char c;//from ww w. j a v a 2 s . c o m // remove at start outer: while (len > 0) { c = list.charAt(0); for (int i = 0; i < del.length; i++) { if (c == del[i]) { list = list.substring(1); len = list.length(); continue outer; } } break; } return list; } }