Skips spaces in the given String.

@param sIn
Input String.
@param nStart
Starting position.
@return The new position or -1 if EOL has been reached.
353413
public static int skipSpaces (final String sIn, final int nStart)
  {
    int pos = nStart;
    while (pos < sIn.length () && (sIn.charAt (pos) == ' ' || sIn.charAt (pos) == '\n'))
      pos++;
    return pos < sIn.length () ? pos : -1;
  }
740902
public static void noSpace(String string) throws JSONException {
    int i, length = string.length();
    if (length == 0) {
      throw new JSONException("Empty string.");
    }
    for (i = 0; i < length; i += 1) {
      if (Character.isWhitespace(string.charAt(i))) {
        throw new JSONException("'" + string + "' contains a space character.");
      }
    }
  }
497436
static public int skipToChar(byte[] data, int start, byte target) {
        int index = start;
        while (index < data.length && target != data[index]) {
            index++;
        }
        return index;
    }
909115
private int skipAhead(RunContainer skippingOn, int pos, int targetToExceed) {
    int left = pos;
    int span = 1;
    int probePos = 0;
    int end;
    // jump ahead to find a spot where end > targetToExceed (if it exists)
    do {
      probePos = left + span;
      if (probePos >= skippingOn.nbrruns - 1) {
        // expect it might be quite common to find the container cannot be advanced as far as
        // requested. Optimize for it.
        probePos = skippingOn.nbrruns - 1;
        end = toIntUnsigned(skippingOn.getValue(probePos))
            + toIntUnsigned(skippingOn.getLength(probePos)) + 1;
        if (end <= targetToExceed) {
          return skippingOn.nbrruns;
        }
      }
      end = toIntUnsigned(skippingOn.getValue(probePos))
          + toIntUnsigned(skippingOn.getLength(probePos)) + 1;
      span *= 2;
    } while (end <= targetToExceed);
    int right = probePos;
    // left and right are both valid positions. Invariant: left <= targetToExceed && right >
    // targetToExceed
    // do a binary search to discover the spot where left and right are separated by 1, and
    // invariant is maintained.
    while (right - left > 1) {
      int mid = (right + left) / 2;
      int midVal = toIntUnsigned(skippingOn.getValue(mid))
          + toIntUnsigned(skippingOn.getLength(mid)) + 1;
      if (midVal > targetToExceed) {
        right = mid;
      } else {
        left = mid;
      }
    }
    return right;
  }
1270543
private static String trimSpaceAtStart(final String temp, final String termName) {
        if (termName != null && termName.charAt(termName.length() - 1) == ' ') {
            if (temp.charAt(0) == ' ') {
                return temp.substring(1);
            }
        }
        return temp;
    }
425855
public static String startWithSpace(String value) {
		if (value.length() > 0 && (value.charAt(0) != ' ' && value.charAt(0) != '\t')) {
			return " " + value;
		}

		return value;
	}
278226
private int skipForward(char[] chars, int start, int length) {
    if (tc.isEntryEnabled())
      tc.entry(this,cclass, "skipForward", new Object[]{chars,new Integer(start),
        new Integer(length)});
    int ans = length;
    for (int i = 0; i < length; i++)
      if (chars[start+i] == MatchSpace.SUBTOPIC_SEPARATOR_CHAR) {
        ans = i;
        break;
      }
    if (tc.isEntryEnabled())
      tc.exit(this,cclass, "skipForward", new Integer(ans));
    return ans;
  }
46294
public void skipWhiteSpace(final CharSequence buf, final ParserCursor cursor) {
        Args.notNull(buf, "Char sequence");
        Args.notNull(cursor, "Parser cursor");
        int pos = cursor.getPos();
        final int indexFrom = cursor.getPos();
        final int indexTo = cursor.getUpperBound();
        for (int i = indexFrom; i < indexTo; i++) {
            final char current = buf.charAt(i);
            if (!isWhitespace(current)) {
                break;
            }
            pos++;
        }
        cursor.updatePos(pos);
    }
225592
def _skip_spaces_and_peek(self):
        
        while 1:
            # skipping spaces
            self.skip_chars(self.end, lambda x: x in self.spaces)
            c = self.peek()
            if not self.params.allow_comments:
                return c
            if c != '/':
                return c
            d = self.peek(1)
            if d == '/':
                self.skip_to(self.pos + 2)
                self._skip_singleline_comment()
            elif d == '*':
                self.skip_to(self.pos + 2)
                self._skip_multiline_comment()
            else:
                return c
1128262
public static String stripInitialWhitespace(String s) {
        int i = 0;

        while ((i < s.length()) && charInString(s.charAt(i), whitespace)) i++;
        return s.substring(i);
        // return s.substring(i, s.length);
    }
249725
private static int findStart( char[] buffer, int start, int end )
    {
        int pos, cp;
        for ( pos = start; pos < end && isWhitespace( cp = codePointAt( buffer, pos ) ); pos += charCount( cp ) )
        {
            if ( cp == '\n' )
            {
                start = pos + 1;
            }
        }
        return pos >= end ? end : start;
    }
1191254
private int skipWhiteSpace(String s, int start) {
        for (int i = start; i < s.length(); i++) {
            char c = s.charAt(i);
            if (!Character.isWhitespace(c)) {
                return i;
            }
        }
        return -1;
    }
1186067
def skip(self, chars=spaceCharactersBytes):
        """"""
        p = self.position               # use property for the error-checking
        while p < len(self):
            c = self[p:p + 1]
            if c not in chars:
                self._position = p
                return c
            p += 1
        self._position = p
        return None
655747
public int skipWhitespace() {
        for (int i = index; i < originalInput.length(); i++) {
            char ch = originalInput.charAt(i);
            if (Character.isSpaceChar(ch) ) {
                index++;
            } else {
                break;
            }
        }
        return index;
    }
692555
public boolean skipPast(String to) throws JSONException {
		boolean b;
		char c;
		int i;
		int j;
		int offset = 0;
		int length = to.length();
		char[] circle = new char[length];

		/*
		 * First fill the circle buffer with as many characters as are in the to string. If we reach an early end, bail.
		 */

		for (i = 0; i < length; i += 1) {
			c = next();
			if (c == 0) {
				return false;
			}
			circle[i] = c;
		}

		/* We will loop, possibly for all of the remaining characters. */

		for (;;) {
			j = offset;
			b = true;

			/* Compare the circle buffer with the to string. */

			for (i = 0; i < length; i += 1) {
				if (circle[j] != to.charAt(i)) {
					b = false;
					break;
				}
				j += 1;
				if (j >= length) {
					j -= length;
				}
			}

			/* If we exit the loop with b intact, then victory is ours. */

			if (b) {
				return true;
			}

			/* Get the next character. If there isn't one, then defeat is ours. */

			c = next();
			if (c == 0) {
				return false;
			}
			/*
			 * Shove the character in the circle buffer and advance the circle offset. The offset is mod n.
			 */
			circle[offset] = c;
			offset += 1;
			if (offset >= length) {
				offset -= length;
			}
		}
	}
1098885
protected static String getStartedWord(String str, int pos){
		assert(pos < str.length() && pos >= 0);

		if(	posIsAtWordStart(str, pos) ){
			int nextSpace = findNextNonLetterOrDigit(str, pos);
			if(nextSpace == -1){
				nextSpace = str.length();
			}
			
			return str.substring(pos, nextSpace);
		}
		return null;
	}
368977
public static int skipWhiteSpace(CharSequence s, int i) {
        while(i<s.length() && isWhiteSpace(s.charAt(i))) {
            ++i;
        }
        return i;
    }