static String ltrim(String s) { int i = 0; while (i < s.length() && " \t\r\n".indexOf(s.charAt(i)) >= 0) ++i; return i > 0 ? s.substring(i) : s; }