Here you can find the source of ltrim(String s)
public static String ltrim(String s)
//package com.java2s; public class Main { public static String ltrim(String s) { int i = 0; while (i < s.length() && Character.isWhitespace(s.charAt(i))) i++;// w w w . j a v a 2 s. com return s.substring(i); } }