This version is out of date, covering development from v9.5.0 to v9.7.3. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox v9 Icon

String.skipWhitespace()


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Last Altered: 

 Function  [other Function type actions]

 Item  [operators of similar scope]

 Stream parsing  [other Stream parsing operators]

 Baseline

 As at baseline


Syntax note: Operators without any defined mandatory arguments may omit their empty closing parentheses


String.skipWhitespace()

String.skipWhitespace

Advances the String stream to the first character that is not whitespace. A failure occurs if the stream is exhausted.

For example:

vText = $Text.skipWhitespace(); 

Tests that the next characters in the stream are non-word, and advances the stream beyond the detected whitespaces characters. Otherwise, it fails and the cursor does not advance. Either way, the variable vText receives the resulting text stream as would any operator chained to .skipWhitespace() unless a failure occurs in which case chained operators are not processed.

If the stream passed in is " Hello world" (note the leading spaces) then the spaces are detected and the cursor returns "Hello world". But if the stream passed in is "Hello world" a word is detected and the cursor does not advance.

The presumption for use of this operator is as an assist to help ensure to-be-captured content is correctly detected. Essentially, this is a 'if' style test: if the test is correct proceed, else the cursor remains where it is for any possible chained stream parsing operators.