Tinderbox v10 Icon

String.skipTo(matchStr)


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Last Altered: 

Operator Uses Regular Expressions: 

 Function  [other Function type actions]

 Item  [operators of similar scope]

 Stream parsing  [other Stream parsing operators]

 Baseline

 As at baseline

 [More on regular expressions in Tinderbox]


String.skipTo(matchStr)

Looks for the matchStr (N.B. this is not a regular expression) in the source String stream. If not found, it returns nothing. If found, it returns the string that follows matchStr.

For example:

vText = $Text.skipTo("abc"); 

Tests that the next characters in the stream read from $Text is the sequence abc, and advances the stream beyond "abc". Otherwise, it fails and the cursor does not advance. Either way, variable vText receives the resulting text stream as would any operator chained to .skipTo() unless a failure occurs in which case chained operators are not processed.

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.