Softanza
StartFrançais
Softanza
The library documents itself · String

stzStringWords

21 own methods · 10 forms written with extensions, listed under their method

the source: base/string/stzStringWords.ring(opens in a new tab) · All classes · The area reference: String

Under each method, its extensions (Q CS XT Z ZZ IB W U): bold and ticked, it exists; struck, it does not. The extensions and what they mean

Examples: 0 come from the library's tests; 17 were composed from each method's signature and run for this page, on a fresh object, for example o1 = new stzStringWords("hello dear world dear"). 4 methods have none yet. Examples run on 2026-10-03 12:54 inside the library at commit 0e72e2e2c.

Method
Explanation, as the source carries it
init
(no comment in the source: the name reads as a sentence) initno extension
Content
(no comment in the source: the name reads as a sentence) contentno extension
NumberOfChars
(no comment in the source: the name reads as a sentence) number of chars
composed example
o1 = new stzStringWords("hello dear world dear")
? o1.NumberOfChars()
#--> 21
composed from the signature, run for this page
no extension
IsEmpty
(no comment in the source: the name reads as a sentence) is empty
composed example
o1 = new stzStringWords("hello dear world dear")
? o1.IsEmpty()
#--> 0
composed from the signature, run for this page
no extension
Words
words
composed example
o1 = new stzStringWords("hello dear world dear")
? @@( o1.Words() )
#--> [ "hello", "dear", "world", "dear" ]
composed from the signature, run for this page
QCSXTZZZIBWU
NumberOfWords
number of wordsalso written: CountWords · HowManyWords
composed example
o1 = new stzStringWords("hello dear world dear")
? o1.NumberOfWords()
#--> 4
composed from the signature, run for this page
no extension
NthWord
nth wordalso written: Word
composed example
o1 = new stzStringWords("hello dear world dear")
? o1.NthWord(2)
#--> dear
composed from the signature, run for this page
no extension
FirstWord
nth word
composed example
o1 = new stzStringWords("hello dear world dear")
? o1.FirstWord()
#--> hello
composed from the signature, run for this page
no extension
LastWord
nth word
composed example
o1 = new stzStringWords("hello dear world dear")
? o1.LastWord()
#--> dear
composed from the signature, run for this page
no extension
NFirstWords
first/last n words
composed example
o1 = new stzStringWords("hello dear world dear")
? @@( o1.NFirstWords(2) )
#--> [ "hello", "dear" ]
composed from the signature, run for this page
no extension
NLastWords
first/last n words
composed example
o1 = new stzStringWords("hello dear world dear")
? @@( o1.NLastWords(2) )
#--> [ "world", "dear" ]
composed from the signature, run for this page
no extension
WordAtPosition
word at position
composed example
o1 = new stzStringWords("hello dear world dear")
? o1.WordAtPosition(2)
#--> hello
composed from the signature, run for this page
no extension
UniqueWords
unique words
composed example
o1 = new stzStringWords("hello dear world dear")
? @@( o1.UniqueWords() )
#--> [ "hello", "dear", "world" ]
composed from the signature, run for this page
QCSXTZZZIBWU
LongestWord
longest / shortest word
composed example
o1 = new stzStringWords("hello dear world dear")
? o1.LongestWord()
#--> hello
composed from the signature, run for this page
no extension
ShortestWord
longest / shortest word
composed example
o1 = new stzStringWords("hello dear world dear")
? o1.ShortestWord()
#--> dear
composed from the signature, run for this page
no extension
AverageWordLength
longest / shortest word
composed example
o1 = new stzStringWords("hello dear world dear")
? o1.AverageWordLength()
#--> 4.50
composed from the signature, run for this page
no extension
WordFrequencies
word frequencies
composed example
o1 = new stzStringWords("hello dear world dear")
? @@( o1.WordFrequencies() )
#--> [ [ "hello", 1 ], [ "dear", 2 ], [ "world", 1 ] ]
composed from the signature, run for this page
no extension
MostFrequentWord
word frequencies
composed example
o1 = new stzStringWords("hello dear world dear")
? o1.MostFrequentWord()
#--> dear
composed from the signature, run for this page
no extension
ContainsWord
word exists
composed example
o1 = new stzStringWords("hello dear world dear")
? o1.ContainsWord("an")
#--> 0
composed from the signature, run for this page
QCSXTZZZIBWU
ReplaceWord
replace wordQCSXTZZZIBWU
RemoveWord
remove wordQCSXTZZZIBWU