Operator Type:
Operator Scope of Action:
Operator Purpose:
Data Type Returned:
Operator First Added:
Operator in Current Baseline:
Operator Last Altered:
Operator Has Optional Arguments:
Function [other Function type actions]
Item [operators of similar scope]
Stream parsing [other Stream parsing 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.captureRest(targetAttributeStr)
String.captureRest()
String.captureRest
Stores all of the String from the current position to its end into the specified targetAttributeStr, which is a quoted name of an attribute, and returns an empty string.
If the targetAttributeStr is omitted the String is advanced to the end so processing ceases.
The value given for targetAttributeSt can be:
- a quoted literal string, e.g.
("Text")
for $Text. - an unquoted variable/loopVariable, e.g.
(vString)
for a variable 'vString'.
For example, if the stream is "Goodbye cruel world.\nHello again.":
vString = $Text.captureWord("SomeAttribute").captureRest(vRest);
results in attribute $SomeAttribute
holding the value "Goodbye" and the variable vRest
holding the value " cruel world.\nHello again".
See also—notes linking to here: