Java tutorial
//package com.java2s; //License from project: Open Source License public class Main { private static int skipSpaces(String s, int i) { while (i < s.length() && isSpace(s.charAt(i))) i++; return i; } private static boolean isSpace(char c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t'; } }