Here you can find the source of skipSpaces(String s, int start)
Parameter | Description |
---|---|
s | the string |
start | index to start |
public static int skipSpaces(String s, int start)
//package com.java2s; public class Main { /**/* ww w . ja v a2 s . c o m*/ * Skips any spaces at or after start and returns the index of first * non-space character; * @param s the string * @param start index to start * @return index of first non-space */ public static int skipSpaces(String s, int start) { int limit = s.length(); int i = start; for (; i < limit; i++) { if (s.charAt(i) != ' ') { break; } } return i; } }