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)"