Operator Type:
Operator Scope of Action:
Operator Purpose:
Data Type Returned:
Operator First Added:
Operator in Current Baseline:
Operator Last Altered:
Function [other Function type actions]
Item [operators of similar scope]
Data manipulation [other Data manipulation operators]
String [about String data type]
v9.1.0
Baseline
As at baseline
Syntax note: Operators without any defined mandatory arguments may omit their empty closing parentheses
String.next()
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)"