This version is out of date, covering development from v6.0.0 to v6.6.5. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

TinderboxSix Icon

String.words(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]

 Baseline

 


$MyString.words(N)

returns the first N words of a string. If the string has fewer than N words, returns the entire string. If N is negative, it returns -N words from the end of the string. If $MyString is "Romans, they go house?".

$MyString.words(2)

returns "Romans, they".

$MyString.words(-1)

returns "house?". Note that punctuation contiguous to words gets passed through as part of the returned word(s).



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