This version is out of date, covering development from v5.0.0 to v5.12.2. It is maintained here only for inbound reference links from elsewhere.

Jump to the current version of aTbRef.

Tinderbox Icon

String.paragraphs(N)


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]

 5.8.0

 


String.paragraphs(N)

This function extracts the first N paragraphs of the referenced string or String-type attribute. Examples:

$MyString = "Paragraph 1\nParagraph 2".paragraphs(1) 

In the example the "\n" simulates a line break. The code would set $MyString to the string "Paragraph 1".

$Text = $Text(Some note).paragraphs(2) 

In the second example the current note's $Text would be set to the first 2 paragraphs of note "Some note".

To get a single given paragraph of a multi line/paragraph string, such as $Text, see String.split().


Possible relevant notes (via "Similar Notes" feature):


A Tinderbox Reference File : Actions & Rules : Operators : Full Operator List : String.paragraphs(N)