Softanza
DémarrerEnglish
Softanza
La bibliothèque se documente elle-même · Chaînes de caractères

stzStringList

92 méthodes propres · 65 formes avec extensions, rangées sous leur méthode

aussi nommée: stzListOfstrings

la source: base/string/stzStringList.ring(s'ouvre dans un nouvel onglet) · Toutes les classes · La référence du domaine : Chaînes de caractères

Sous chaque méthode, ses extensions (Q CS XT Z ZZ IB W U) : en gras et cochée, elle existe ; barrée, elle n'existe pas. Les extensions et leur sens

Exemples : 0 viennent des tests de la bibliothèque ; 54 ont été composés à partir de la signature de chaque méthode et exécutés pour cette page, sur un objet neuf, par exemple o1 = new stzStringList([ "tea", "rice", "fish" ]). 38 méthodes n'en ont pas encore. Exemples exécutés le 2026-10-03 20:34 dans la bibliothèque au commit 0e72e2e2c.

Méthode
Explication, telle que la source la porte
init
Build the string-list object from the given list of strings.aucune extension
Content
(Doc()/Ask()/AskFor()/ExplainMethod() are inherited from stzObject.)aucune extension
Copy
A new stzStringList with the same strings.aucune extension
NumberOfStrings
How many strings the list holds.aussi écrite: Size
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.NumberOfStrings()
#--> 3
composé à partir de la signature, exécuté pour cette page
aucune extension
NthString
The string at position n.aussi écrite: String
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.NthString(2)
#--> rice
composé à partir de la signature, exécuté pour cette page
aucune extension
FirstString
The first string of the list.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.FirstString()
#--> tea
composé à partir de la signature, exécuté pour cette page
aucune extension
LastString
The last string of the list.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.LastString()
#--> fish
composé à partir de la signature, exécuté pour cette page
aucune extension
Add
Add the given string at the end of the list (mutating).
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
o1.Add("a")
? @@( o1.Content() )
#--> [ "tea", "rice", "fish", "a" ]
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
Prepend
Insert the given string at the start of the list (mutating).
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
o1.Prepend("a")
? @@( o1.Content() )
#--> [ "a", "tea", "rice", "fish" ]
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
RemoveAt
Remove the string at position n (mutating).
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
o1.RemoveAt(2)
? @@( o1.Content() )
#--> [ "tea", "fish" ]
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
ReplaceAt
Replace the string at position n with the given one (mutating).
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
o1.ReplaceAt(2, "AN")
? @@( o1.Content() )
#--> [ "tea", "AN", "fish" ]
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
Update
Replace the whole content with the given list of strings (mutating; the single update point).QCSXTZZZIBWU
Concat
All the strings concatenated into one string.aussi écrite: Joined · Concatenated
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.Concat()
#--> tearicefish
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
ConcatUsing
The strings concatenated with the given separator between them.aussi écrite: JoinedUsing · ConcatenatedUsing
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.ConcatUsing(" ")
#--> tea rice fish
composé à partir de la signature, exécuté pour cette page
aucune extension
Contains
Same as ContainsCS: TRUE if one of the strings equals pcStr.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.Contains("a")
#--> 0
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
ContainsSubString
contains substring in any string
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.ContainsSubString("a")
#--> 1
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
Find
Same as FindCS: The positions of every string equal to pcStr, as a list.QCSXTZZZIBWU
FindFirst
The position of the first string equal to pcStr (0 if none).
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.FindFirst("a")
#--> 0
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
FindLast
The position of the last string equal to pcStr (0 if none).
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.FindLast("a")
#--> 0
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
FindString
Same as FindCS: The positions of every string equal to pcStr, as a list.QCSXTZZZIBWU
FindNthOccurrence
Same as FindNthOccurrenceCS: The position of the Nth string equal to pcStr, or 0 when there are fewer than N of them.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.FindNthOccurrence(2, "a")
#--> 0
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
NumberOfOccurrence
Same as NumberOfOccurrenceCS: How many strings EQUAL pcStr.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.NumberOfOccurrence("a")
#--> 0
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
NumberOfOccurrences
Same as NumberOfOccurrenceCS: How many strings EQUAL pcStr.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.NumberOfOccurrences("a")
#--> 0
composé à partir de la signature, exécuté pour cette page
aucune extension
NumberOfOccurrenceOfSubString
Same as NumberOfOccurrenceOfSubStringCS: How many times pcSubStr occurs INSIDE the strings, summed over all of them -- a different question from the one above, and the reason both names exist.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.NumberOfOccurrenceOfSubString("a")
#--> 1
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
DuplicatedStrings
Same as DuplicatedStringsCS: The strings that appear more than once, each named ONCE and in the order of their first appearance.QCSXTZZZIBWU
RemoveAll
Same as RemoveAllCS: Every string equal to pcStr goes. Walks BACKWARDS: removing forwards shifts the positions still to be visited, which is how this kind of loop silently skips a neighbouring duplicate.QCSXTZZZIBWU
RemoveFirst
Same as RemoveFirstCS: Only the FIRST one goes.QCSXTZZZIBWU
RemoveFirstString
No argument: drop whatever sits first, whatever it is.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
o1.RemoveFirstString()
? @@( o1.Content() )
#--> [ "rice", "fish" ]
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
RemoveLastString
(sans commentaire dans la source : le nom se lit comme une phrase) remove last stringdans la section the vocabulary the tests already speak
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
o1.RemoveLastString()
? @@( o1.Content() )
#--> [ "tea", "rice" ]
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
RemoveNthOccurrence
(sans commentaire dans la source : le nom se lit comme une phrase) remove nth occurrencedans la section the vocabulary the tests already speakQCSXTZZZIBWU
RemoveStringAtPosition
(sans commentaire dans la source : le nom se lit comme une phrase) remove string at positiondans la section the vocabulary the tests already speak
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
o1.RemoveStringAtPosition(2)
? @@( o1.Content() )
#--> [ "tea", "fish" ]
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
RemoveNthString
The test file says it plainly: "RemoveNthString(3) # or RemoveStringAtPosition(3)". Both spellings, one implementation.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
o1.RemoveNthString(2)
? @@( o1.Content() )
#--> [ "tea", "fish" ]
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
RemoveStringsAtThesePositions
Positions are read against the ORIGINAL list, so they are sorted and applied from the back. Taking them in the order given would make each removal shift the ones after it.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
o1.RemoveStringsAtThesePositions([ 2, 3 ])
? @@( o1.Content() )
#--> [ "tea" ]
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
RemoveMany
(sans commentaire dans la source : le nom se lit comme une phrase) remove manydans la section the vocabulary the tests already speakQCSXTZZZIBWU
RemoveEmptyStrings
An empty string is "", not a string of spaces -- RemoveSpaces() above is the one that judges whitespace.QCSXTZZZIBWU
ReplaceString
Same as ReplaceStringCS: Every string equal to pcOld becomes pcNew.QCSXTZZZIBWU
ReplaceManyOneByOne
Same as ReplaceManyOneByOneCS: The two lists must be the same length; a mismatch replaces nothing rather than guessing which pairing was meant.QCSXTZZZIBWU
Move
Both arguments arrive as named pairs, so the number is the SECOND element. A bare number is accepted too, for callers who do not need the ceremony.QCSXTZZZIBWU
Swap
Swap( :BetweenString = 1, :AndString = 2 )QCSXTZZZIBWU
FindAll
Same as FindCS: The positions of every string equal to pcStr, as a list.QCSXTZZZIBWU
WordsSortingOrders
:Ascending, :Descending, or :Unsorted for neither. A string of fewer than two words is :Ascending -- there is no pair to be out of order, and calling it unsorted would read as a complaint.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? @@( o1.WordsSortingOrders() )
#--> [ "ascending", "ascending", "ascending" ]
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
NumberOfStringsWhereWordsAreSortedInAscending
How many strings fall in each verdict. Counted from the one list above so the three can never disagree with it, or with each other -- they sum to NumberOfStrings() by construction.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.NumberOfStringsWhereWordsAreSortedInAscending()
#--> 3
composé à partir de la signature, exécuté pour cette page
aucune extension
NumberOfStringsWhereWordsAreSortedInDescending
(sans commentaire dans la source : le nom se lit comme une phrase) number of strings where words are sorted in descendingdans la section the vocabulary the tests already speak
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.NumberOfStringsWhereWordsAreSortedInDescending()
#--> 0
composé à partir de la signature, exécuté pour cette page
aucune extension
NumberOfStringsWhereWordsAreUnsorted
(sans commentaire dans la source : le nom se lit comme une phrase) number of strings where words are unsorteddans la section the vocabulary the tests already speak
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.NumberOfStringsWhereWordsAreUnsorted()
#--> 0
composé à partir de la signature, exécuté pour cette page
aucune extension
IsUppercase
TRUE when EVERY string is uppercase. An empty list answers FALSE: there is no string in it that is uppercase, and answering TRUE for "all of nothing" reads as a claim about content that is not there.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.IsUppercase()
#--> 0
composé à partir de la signature, exécuté pour cette page
aucune extension
IsLowercase
(sans commentaire dans la source : le nom se lit comme une phrase) is lowercasedans la section the vocabulary the tests already speak
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.IsLowercase()
#--> 1
composé à partir de la signature, exécuté pour cette page
aucune extension
ContainsSubstringInEachString
Same as ContainsSubstringInEachStringCS: TRUE when the substring is in EVERY string -- not merely in one of them, which is what ContainsSubString() above answers.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.ContainsSubstringInEachString("a")
#--> 0
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
WordsOfEachStringAreSortedInAscending
A string of one word is trivially in order, so a list of them answers TRUE; an EMPTY list answers FALSE, matching IsUppercase above rather than claiming something about content that is not there.aussi écrite: WordsOfEachStringSortedInAscending
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.WordsOfEachStringAreSortedInAscending()
#--> 1
composé à partir de la signature, exécuté pour cette page
aucune extension
WordsOfEachStringAreSortedInDescending
(sans commentaire dans la source : le nom se lit comme une phrase) words of each string are sorted in descendingaussi écrite: WordsOfEachStringSortedInDescendingdans la section the vocabulary the tests already speak
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.WordsOfEachStringAreSortedInDescending()
#--> 1
composé à partir de la signature, exécuté pour cette page
aucune extension
SortInAscending
Same as SortInAscendingCS: Sort the strings in ascending order in place (mutating).
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
o1.SortInAscending()
? @@( o1.Content() )
#--> [ "fish", "rice", "tea" ]
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
SortUp
Same as SortInAscending: Same as SortInAscendingCS: Sort the strings in ascending order in place (mutating).
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
o1.SortUp()
? @@( o1.Content() )
#--> [ "fish", "rice", "tea" ]
composé à partir de la signature, exécuté pour cette page
aucune extension
SortedInAscending
Same as SortedInAscendingCS: An ascending-sorted copy; the original is unchanged.aussi écrite: SortedUp
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? @@( o1.SortedInAscending() )
#--> [ "fish", "rice", "tea" ]
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
Sorted
Sorted() shorthand -- default ascending case-sensitive sort, used by narrative one-liners like `o.Sorted()` that don't distinguish direction.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? @@( o1.Sorted() )
#--> [ "fish", "rice", "tea" ]
composé à partir de la signature, exécuté pour cette page
aucune extension
WithoutSpaces
WithoutSpaces / WithoutSapces (Softanza intentionally accepts the misspelled form): return the content with every space removed from each string item.aussi écrite: TrimAll · WithoutSapcesaucune extension
SortInDescending
Sort the strings in descending order in place (mutating).QCSXTZZZIBWU
SortDown
Same as SortInDescending: Sort the strings in descending order in place (mutating).aucune extension
SortedInDescending
A descending-sorted copy; the original is unchanged.aussi écrite: SortedDownaucune extension
SortBy
SortBy(cExpr): sort by an eval'd expression where @string aliases the per-item string. Pre-compute keys once, then insertion-sort over (key, value) pairs.QCSXTZZZIBWU
Reverse
Reverse the order of the strings in place (mutating).
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
o1.Reverse()
? @@( o1.Content() )
#--> [ "fish", "rice", "tea" ]
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
Reversed
The strings in reverse order, as a Haro list; the original is unchanged.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? @@( o1.Reversed() )
#--> [ "fish", "rice", "tea" ]
composé à partir de la signature, exécuté pour cette page
aucune extension
Unique
unique (remove duplicates, engine-backed)QCSXTZZZIBWU
RemoveDuplicates
unique (remove duplicates, engine-backed)aucune extension
UniqueItems
unique (remove duplicates, engine-backed)aussi écrite: WithoutDuplicatesaucune extension
Filter
filter -- strings containing a substring
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? @@( o1.Filter("a") )
#--> [ "tea" ]
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
FilterByStartsWith
filter by starts-with / ends-withQCSXTZZZIBWU
FilterByEndsWith
filter by starts-with / ends-with
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? @@( o1.FilterByEndsWith("a") )
#--> [ "tea" ]
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
ToUpper
Uppercase every string in place (mutating).QCSXTZZZIBWU
Uppercased
A copy with every string uppercased; the original is unchanged.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? @@( o1.Uppercased() )
#--> [ "TEA", "RICE", "FISH" ]
composé à partir de la signature, exécuté pour cette page
aucune extension
ToLower
Lowercase every string in place (mutating).QCSXTZZZIBWU
Lowercased
A copy with every string lowercased; the original is unchanged.aucune extension
MostSimilarTo
similarity (engine-backed jaro / jarowinkler)
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.MostSimilarTo("a")
#--> tea
composé à partir de la signature, exécuté pour cette page
aucune extension
SimilarTo
similarity (engine-backed jaro / jarowinkler)QCSXTZZZIBWU
ToString
The strings joined with newlines, as one string.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.ToString()
#--> tea
#--> rice
#--> fish
composé à partir de la signature, exécuté pour cette page
aucune extension
ToListOfStzStrings
Each string wrapped as a stzString object, as a list.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? @@( o1.ToListOfStzStrings() )
#--> [ @noname, @noname, @noname ]
composé à partir de la signature, exécuté pour cette page
aucune extension
ToStzList
The strings as a stzList object.aucune extension
Split
Split each string on the given separator.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? @@( o1.Split(" ") )
#--> [ [ "tea" ], [ "rice" ], [ "fish" ] ]
composé à partir de la signature, exécuté pour cette page
aucune extension
Trim
Trim the spaces around each string in place (mutating).QCSXTZZZIBWU
Trimmed
A copy with each string trimmed; the original is unchanged.aucune extension
Matches
The strings matching the given regex pattern.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.Matches("a")
#--> 0
composé à partir de la signature, exécuté pour cette page
aucune extension
IsStzStringList
Always TRUE: the object IS a stzStringList.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.IsStzStringList()
#--> 1
composé à partir de la signature, exécuté pour cette page
aucune extension
stzType
The Softanza type symbol: :stzStringList.aussi écrite: ClassName
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.stzType()
#--> stzstringlist
composé à partir de la signature, exécuté pour cette page
aucune extension
Concatenate
All the strings concatenated, no separator.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.Concatenate()
#--> tearicefish
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
SpacesRemoved
The strings with their spaces removed, as data.aucune extension
ConcatenateUsing
Same as ConcatenateXT: Long-tail methods needed by the test suite.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.ConcatenateUsing(" ")
#--> tea rice fish
composé à partir de la signature, exécuté pour cette page
aucune extension
RemoveSpaces
Remove the spaces inside each string (mutating).QCSXTZZZIBWU
SubStrongs
Substrongs/Substrinks (deliberate Softanza wordplay): the strings that CONTAIN another item of the list, and the ones that are CONTAINED IN another item (case-sensitive, engine-backed find).aucune extension
SubStrinks
The items CONTAINED IN another item of the list -- the mirror of SubStrongs, not an alias of it (the old comment said "the substrings of each string", which describes neither).aucune extension
StringsW
The strings satisfying the given W expression.aucune extension
Yield
StringsW above answers WHICH strings matched; this answers what the condition said about each one, so the result lines up with Content() position for position. Same evaluation, two questions.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? @@( o1.Yield("@item > 3") )
#--> [ 0, 0, 0 ]
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
ThatContain
Lexical (non-semantic) selection over a list of fragments -- substring membership and word-length ranking -- so chains like Q(text).WordsQ().ThatContain("ing").Longest() read naturally. These are STRING ops (any list of strings has them). MEANING-based selection (MostSimilarByMeaning, ThatAre by sentiment) lives on stzListOfTexts, the list-of-texts domain -- because that is natural processing, not a string op. Fragments that contain pcSub (engine-backed, codepoint-safe).
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? @@( o1.ThatContain("a") )
#--> [ "tea" ]
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
Longest
The string with the MOST words.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.Longest()
#--> tea
composé à partir de la signature, exécuté pour cette page
aucune extension
Shortest
The string with the FEWEST words.
exemple composé
o1 = new stzStringList([ "tea", "rice", "fish" ])
? o1.Shortest()
#--> tea
composé à partir de la signature, exécuté pour cette page
aucune extension