Softanza
StartFrançais
Softanza
The library documents itself · String

stzStringText

114 own methods · 33 forms written with extensions, listed under their method

the source: base/string/stzStringText.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; 77 were composed from each method's signature and run for this page, on a fresh object, for example o1 = new stzStringText("The quick brown fox. It jumps!"). 37 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
Build the text object from a string or a stzString.no extension
Content
(Doc()/Ask()/AskFor()/ExplainMethod() are inherited from stzObject -- the common ground for every Softanza object.)also written: Textno extension
NumberOfChars
How many chars the text holds.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.NumberOfChars()
#--> 30
composed from the signature, run for this page
no extension
IsEmpty
TRUE if the text is empty.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.IsEmpty()
#--> 0
composed from the signature, run for this page
no extension
Copy
A new stzStringText with the same content.no extension
ToStzString
The text wrapped as a stzString object.no extension
Engine
The engine handle of the underlying string.no extension
Update
Replace the content with the given string (mutating).
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
o1.Update("an")
? o1.Content()
#--> an
composed from the signature, run for this page
no extension
UpdateWith
Same as Update: replace the content (mutating).
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
o1.UpdateWith("an")
? o1.Content()
#--> an
composed from the signature, run for this page
no extension
SetLanguage
Set the working language of the text.no extension
Language
language
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? @@( o1.Language() )
#--> "NULL"
composed from the signature, run for this page
no extension
Script
The (dominant) script of the string.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.Script()
#--> latin
composed from the signature, run for this page
no extension
Scripts
The scripts used in the string.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? @@( o1.Scripts() )
#--> [ "latin", "common" ]
composed from the signature, run for this page
no extension
NumberOfScripts
How many scripts the string uses.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.NumberOfScripts()
#--> 2
composed from the signature, run for this page
no extension
CountScripts
How many scripts the text uses.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.CountScripts()
#--> 2
composed from the signature, run for this page
no extension
NumberOfDistinctScripts
How many distinct scripts the text uses.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.NumberOfDistinctScripts()
#--> 2
composed from the signature, run for this page
no extension
ScriptIs
TRUE if the text's dominant script is the given one.no extension
ContainsScript
TRUE if the text uses the given script.no extension
ContainsArabicScript
TRUE if the text contains Arabic-script content.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.ContainsArabicScript()
#--> 0
composed from the signature, run for this page
no extension
ContainsLatinScript
TRUE if the text contains Latin-script content.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.ContainsLatinScript()
#--> 1
composed from the signature, run for this page
no extension
IsLatinScript
TRUE if the string is written in the Latin script.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.IsLatinScript()
#--> 1
composed from the signature, run for this page
no extension
IsArabicScript
TRUE if the string is written in the Arabic script.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.IsArabicScript()
#--> 0
composed from the signature, run for this page
no extension
IsHanScript
TRUE if the string is written in the Han script.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.IsHanScript()
#--> 0
composed from the signature, run for this page
no extension
IsHybridScript
TRUE if the string mixes several scripts.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.IsHybridScript()
#--> 0
composed from the signature, run for this page
no extension
IsCommonScript
TRUE if the chars belong to the Common script.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.IsCommonScript()
#--> 0
composed from the signature, run for this page
no extension
IsInheritedScript
TRUE if the chars belong to the Inherited script.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.IsInheritedScript()
#--> 0
composed from the signature, run for this page
no extension
OnlyScript
filtering text by scriptno extension
OnlyArabic
filtering text by scriptno extension
OnlyLatin
filtering text by scriptno extension
NumberOfWords
How many words the text holds.also written: CountWords · HowManyWords
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.NumberOfWords()
#--> 6
composed from the signature, run for this page
no extension
NthWord
The nth word of the text.also written: Word
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.NthWord(2)
#--> quick
composed from the signature, run for this page
no extension
FirstWord
The first word of the string.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.FirstWord()
#--> The
composed from the signature, run for this page
no extension
LastWord
The last word of the string.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.LastWord()
#--> jumps
composed from the signature, run for this page
no extension
Words
The words of the text, as a list (engine-extracted).
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? @@( o1.Words() )
#--> [ "The", "quick", "brown", "fox", "It", "jumps" ]
composed from the signature, run for this page
QCSXTZZZIBWUExcept
UniqueWords
Same as UniqueWordsCS: The unique words of the string.also written: SetOfWords
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? @@( o1.UniqueWords() )
#--> [ "The", "quick", "brown", "fox.", "It", "jumps!" ]
composed from the signature, run for this page
QCSXTZZZIBWU
NumberOfUniqueWords
How many distinct words the text holds.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.NumberOfUniqueWords()
#--> 6
composed from the signature, run for this page
no extension
IsWord
TRUE if the text is a single word.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.IsWord()
#--> 0
composed from the signature, run for this page
no extension
IsArabicWord
TRUE if the text is a single Arabic-script word.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.IsArabicWord()
#--> 0
composed from the signature, run for this page
no extension
IsLatinWord
TRUE if the text is a single Latin-script word.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.IsLatinWord()
#--> 0
composed from the signature, run for this page
no extension
ContainsWord
Same as ContainsWordCS: TRUE if the string contains the given WORD (word-boundary aware).
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.ContainsWord("an")
#--> 0
composed from the signature, run for this page
QCSXTZZZIBWU
ContainsNoWord
TRUE if the text contains NONE of the given words.no extension
ContainsEachWord
Same as ContainsEachWordCS: TRUE if the text contains EVERY one of the given words.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.ContainsEachWord([ "an", "a" ])
#--> 0
composed from the signature, run for this page
QCSXTZZZIBWU
ReverseWords
Reverse the ORDER of the words in place (mutating).
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
o1.ReverseWords()
? o1.Content()
#--> jumps! It fox. brown quick The
composed from the signature, run for this page
QCSXTZZZIBWU
WordsReversed
The words in reverse order, as a copy.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.WordsReversed()
#--> jumps! It fox. brown quick The
composed from the signature, run for this page
no extension
SortWords
Same as SortWordsCS: Sort the words in place (mutating).
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
o1.SortWords()
? o1.Content()
#--> It The brown fox. jumps! quick
composed from the signature, run for this page
QCSXTZZZIBWU
WordsSorted
Same as WordsSortedCS: The words sorted, as a copy; the original is unchanged.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.WordsSorted()
#--> It The brown fox. jumps! quick
composed from the signature, run for this page
QCSXTZZZIBWU
ReverseEachWord
Reverse the CHARS of each word in place (mutating).
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
o1.ReverseEachWord()
? o1.Content()
#--> ehT kciuq nworb .xof tI !spmuj
composed from the signature, run for this page
QCSXTZZZIBWU
EachWordReversed
Each word with its chars reversed, as a copy.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.EachWordReversed()
#--> ehT kciuq nworb .xof tI !spmuj
composed from the signature, run for this page
no extension
RemoveNthWord
Remove the nth word (mutating).
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
o1.RemoveNthWord(2)
? o1.Content()
#--> The brown fox. It jumps!
composed from the signature, run for this page
QCSXTZZZIBWU
NthWordRemoved
A copy with the nth word removed.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.NthWordRemoved(2)
#--> The brown fox. It jumps!
composed from the signature, run for this page
no extension
InsertWordAt
Insert the given word at word-position n (mutating).
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
o1.InsertWordAt(2, "an")
? o1.Content()
#--> The an quick brown fox. It jumps!
composed from the signature, run for this page
QCSXTZZZIBWU
SwapWords
Exchange the words at the two given word-positions (mutating).
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
o1.SwapWords(2, 5)
? o1.Content()
#--> The It brown fox. quick jumps!
composed from the signature, run for this page
QCSXTZZZIBWU
TruncateWords
Keep only the first n words (mutating).
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
o1.TruncateWords(2)
? o1.Content()
#--> The quick
composed from the signature, run for this page
QCSXTZZZIBWU
WordsTruncated
A copy keeping only the first n words.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.WordsTruncated(2)
#--> The quick
composed from the signature, run for this page
no extension
RemoveDuplicateWords
Remove the repeated words, keeping first occurrences (mutating).QCSXTZZZIBWU
DuplicateWordsRemoved
A copy with the repeated words removed.no extension
CountWordsMatching
How many words match the given pattern.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.CountWordsMatching("an")
#--> 0
composed from the signature, run for this page
no extension
NumberOfOccurrenceOfWord
word frequency (ring logic)also written: NumberOfOccurrencesOfWord
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.NumberOfOccurrenceOfWord("an")
#--> 0
composed from the signature, run for this page
QCSXTZZZIBWU
WordFrequency
Each word paired with its frequency.also written: FrequencyOfWord
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.WordFrequency("an")
#--> 0
composed from the signature, run for this page
no extension
WordsAndTheirCounts
Same as WordsAndTheirCountsCS: [[word, count], ...] in first-appearance order. ENGINE-DIRECT, ONE pass.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? @@( o1.WordsAndTheirCounts() )
#--> [ [ "The", 1 ], [ "quick", 1 ], [ "brown", 1 ], [ "fox", 1 ], [ "It", 1 ], [ "jumps", 1 ] ]
composed from the signature, run for this page
QCSXTZZZIBWU
MostFrequentWords
Same as MostFrequentWordsCS: The top-N most frequent words as [[word, count], ...], count descending (ties by first appearance). ENGINE-DIRECT, ONE pass + partial rank.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? @@( o1.MostFrequentWords(2) )
#--> [ [ "The", 1 ], [ "quick", 1 ] ]
composed from the signature, run for this page
QCSXTZZZIBWU
WordsAndTheirFrequencies
word frequency (ring logic)
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? @@( o1.WordsAndTheirFrequencies() )
#--> [ [ "The", 0.17 ], [ "quick", 0.17 ], [ "brown", 0.17 ], [ "fox", 0.17 ], [ "It", 0.17 ], [ "jumps", 0.17 ] ]
composed from the signature, run for this page
no extension
MostFrequentWord
The word that occurs most often in the string.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.MostFrequentWord()
#--> The
composed from the signature, run for this page
no extension
LessFrequentWord
word frequency (ring logic)
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.LessFrequentWord()
#--> The
composed from the signature, run for this page
no extension
NMostFrequentWords
word frequency (ring logic)also written: TopNFrequentWords
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? @@( o1.NMostFrequentWords(2) )
#--> [ "The", "quick" ]
composed from the signature, run for this page
no extension
WordsPositions
word positions (ring logic)
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? @@( o1.WordsPositions() )
#--> [ 1, 5, 11, 17, 22, 25 ]
composed from the signature, run for this page
no extension
WordsAndTheirPositions
word positions (ring logic)
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? @@( o1.WordsAndTheirPositions() )
#--> [ [ "The", [ 1 ] ], [ "quick", [ 5 ] ], [ "brown", [ 11 ] ], [ "fox.", [ 17 ] ], [ "It", [ 22 ] ], [ "jumps!", [ 25 ] ] ]
composed from the signature, run for this page
no extension
WordsSortingOrder
word sorting checks (ring logic)
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.WordsSortingOrder()
#--> unsorted
composed from the signature, run for this page
no extension
WordsAreSorted
word sorting checks (ring logic)
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.WordsAreSorted()
#--> 0
composed from the signature, run for this page
no extension
WordsAreSortedInAscending
word sorting checks (ring logic)
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.WordsAreSortedInAscending()
#--> 0
composed from the signature, run for this page
no extension
WordsAreSortedInDescending
word sorting checks (ring logic)
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.WordsAreSortedInDescending()
#--> 0
composed from the signature, run for this page
no extension
WordsSortedInAscending
word sorting checks (ring logic)
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? @@( o1.WordsSortedInAscending() )
#--> [ "It", "The", "brown", "fox", "jumps", "quick" ]
composed from the signature, run for this page
no extension
WordsSortedInDescending
word sorting checks (ring logic)
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? @@( o1.WordsSortedInDescending() )
#--> [ "quick", "jumps", "fox", "brown", "The", "It" ]
composed from the signature, run for this page
no extension
NumberOfSentences
How many sentences the string holds.also written: SentenceCount · CountSentences · HowManySentences
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.NumberOfSentences()
#--> 2
composed from the signature, run for this page
no extension
Sentences
The sentences of the text, as a list.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? @@( o1.Sentences() )
#--> [ "The quick brown fox.", "It jumps!" ]
composed from the signature, run for this page
no extension
NthSentence
The nth sentence of the text.also written: Sentence
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.NthSentence(2)
#--> It jumps!
composed from the signature, run for this page
no extension
FirstSentence
The first sentence of the text.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.FirstSentence()
#--> The quick brown fox.
composed from the signature, run for this page
no extension
LastSentence
The last sentence of the text.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.LastSentence()
#--> It jumps!
composed from the signature, run for this page
no extension
NumberOfParagraphs
How many paragraphs the string holds.also written: CountParagraphs · HowManyParagraphs
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.NumberOfParagraphs()
#--> 1
composed from the signature, run for this page
no extension
Paragraphs
The paragraphs of the string, as a list.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? @@( o1.Paragraphs() )
#--> [ "The quick brown fox. It jumps!" ]
composed from the signature, run for this page
no extension
NthParagraph
The nth paragraph of the string.also written: Paragraphno extension
FirstParagraph
Same as NthParagraph: The nth paragraph of the string.no extension
LastParagraph
The last paragraph of the text.no extension
NumberOfLines
How many lines the text holds.also written: CountLines · HowManyLines
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.NumberOfLines()
#--> 1
composed from the signature, run for this page
no extension
Lines
The lines of the text, as a list.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? @@( o1.Lines() )
#--> [ "The quick brown fox. It jumps!" ]
composed from the signature, run for this page
no extension
NthLine
The nth line of the text.also written: Lineno extension
FirstLine
The first line of the text.no extension
LastLine
The last line of the text.no extension
DeduplicateLines
Same as DeduplicateLinesCS: Remove the repeated lines, keeping first occurrences (mutating).QCSXTZZZIBWU
LinesDeduplicated
Same as LinesDeduplicatedCS: A copy with the repeated lines removed.QCSXTZZZIBWU
RemoveBlankLines
Remove the blank lines (mutating).QCSXTZZZIBWU
RemoveEmptyLines
Same as RemoveBlankLines: Remove the blank lines (mutating).QCSXTZZZIBWU
BlankLinesRemoved
A copy with the blank lines removed.also written: EmptyLinesRemovedno extension
NumberLines
Prefix each line with its number (mutating).QCSXTZZZIBWU
LinesNumbered
A copy with each line prefixed by its number.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.LinesNumbered()
#--> 1: The quick brown fox. It jumps!
composed from the signature, run for this page
no extension
Simplify
Collapse the whitespace runs to single spaces (mutating).QCSXTZZZIBWU
Simplified
A copy with the whitespace runs collapsed to single spaces.no extension
CollapseSpaces
Collapse the space runs to single spaces (mutating, engine-backed).QCSXTZZZIBWU
SpacesCollapsed
A copy with the space runs collapsed; the original is unchanged.no extension
NormalizeSpaces
Normalize the whitespace (trim + collapse) in place (mutating).QCSXTZZZIBWU
SpacesNormalized
A copy with the whitespace normalized; the original is unchanged.no extension
ToSentenceCase
Sentence-case the text (each sentence's first letter capitalized) -- mutating.QCSXTZZZIBWU
SentenceCased
A sentence-cased copy; the original is unchanged.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.SentenceCased()
#--> The quick brown fox. it jumps!
composed from the signature, run for this page
no extension
Pluralize
Pluralize the (English) word in place (mutating).QCSXTZZZIBWU
Pluralized
The pluralized form, as a copy; the original is unchanged.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.Pluralized()
#--> The quick brown fox. It jumps!s
composed from the signature, run for this page
no extension
ToSlug
The string turned into a URL slug (lowercase, hyphens).also written: Slugified
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.ToSlug()
#--> the-quick-brown-fox-it-jumps
composed from the signature, run for this page
no extension
Abbreviate
Abbreviate the text in place (mutating).also written: Abbreviatedno extension
Initials
The initial letter of each word.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.Initials()
#--> TqbfIj
composed from the signature, run for this page
no extension
DiacriticsRemoved
Delegate-thin wrappers so stzText/stzStringText consumers can reach common stzString helpers without juggling .ToStzString().no extension
RemoveDiacritics
Remove the diacritics (accents) in place (mutating).no extension
Lowercase
Lowercase the text in place (mutating).
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
o1.Lowercase()
? o1.Content()
#--> the quick brown fox. it jumps!
composed from the signature, run for this page
no extension
Uppercase
Uppercase the text in place (mutating).
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
o1.Uppercase()
? o1.Content()
#--> THE QUICK BROWN FOX. IT JUMPS!
composed from the signature, run for this page
no extension
Chars
The chars of the text, as a list.
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? @@( o1.Chars() )
#--> [ "T", "h", "e", " ", "q", "u", "i", "c", "k", " ", "b", "r", "o", "w", "n", " ", "f", "o", "x", ".", " ", "I", "t", " ", "j", "u", "m", "p", "s", "!" ]
composed from the signature, run for this page
no extension
NumberOfChars2
Engine twin of NumberOfChars (codepoint count).
composed example
o1 = new stzStringText("The quick brown fox. It jumps!")
? o1.NumberOfChars2()
#--> 30
composed from the signature, run for this page
no extension