Tinderbox v10 Icon

String.captureLine([targetAttributeStr])


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

 [More on optional operator arguments]


Syntax note: Operators without any defined mandatory arguments may omit their empty closing parentheses


String.captureLine(targetAttributeStr)

String.captureLine()

String.captureLine

Optionally stores the rest of the line (paragraph) in the specified targetAttributeStr, a quoted name of an attribute, and returns the string that follows this line and the String moves forwards to the end of the current line.

If the targetAttributeStr is omitted the String is advanced to the next line without any data being saved.

The value given for targetAttributeSt can be:

For example, if the stream is three paragraphs "Goodbye cruel world.\nHello again.\nFinal text." (the \n is a line break):

$MyString = $Text.captureLine("SomeAttribute").captureLine(vString); 

results in attribute $SomeAttribute holding the value "Goodbye cruel world." and the variable vString holding the value "Hello again.". $MyString holds "Final text.", it being the remainder of the unconsumed stream.


See also—notes linking to here: