This version is out of date, covering development from v9.0.0 to v9.3.0. 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.next


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Altered: 

 Function   [other Function type actions]

 Item   [operators of similar scope]

 Data manipulation   [other Data manipulation operators]

 9.0.0

 


String.next

The operator .next generates convenient note names and other strings in a sequence. For example:

$MyString = "footnote".next ; → "footnote 1"

$MyString = "footnote 1".next; → "footnote 2"

Specifically, .next searches a string for its last run of digits. If no digits are found, .next returns the string followed by " 1". Otherwise, the number is increments and placed in the same position in the string.

$MyString = "Agent 007 (active)".next; → "Agent 008 (active)"