Tinderbox v10 Icon

String.skip(charsNum)


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


String.skip(charsNum)

Moves the current stream position charsNum characters forward (right). A failure occurs if charsNum reaches past the end of the String stream.

For example, for stream "It was the best of times, it was the worst of times":

vText = $Text.skip(20); 

Advances the cursor forward 20 characters, returning the stream "imes, it was the worst of times". Otherwise, if the end of the string is detected, it fails and the cursor does not advance. Either way, variable vText receives the resulting text stream as would any operator chained to .expect() 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.