Softanza
StartFrançais
Softanza
The library documents itself · String

stzStringComparator

29 own methods · 17 forms written with extensions, listed under their method

the source: base/string/stzStringComparator.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; 23 were composed from each method's signature and run for this page, on a fresh object, for example o1 = new stzStringComparator("rest_ababab"). 6 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 stzStringComparator("rest_ababab")
? o1.NumberOfChars()
#--> 11
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 stzStringComparator("rest_ababab")
? o1.IsEmpty()
#--> 0
composed from the signature, run for this page
no extension
IsEqualTo
equality
composed example
o1 = new stzStringComparator("rest_ababab")
? o1.IsEqualTo("an")
#--> 0
composed from the signature, run for this page
QCSXTZZZIBWU
IsNotEqualTo
equality
composed example
o1 = new stzStringComparator("rest_ababab")
? o1.IsNotEqualTo("an")
#--> 1
composed from the signature, run for this page
QCSXTZZZIBWU
IsEqualToOneOfThese
equality with multiple strings
composed example
o1 = new stzStringComparator("rest_ababab")
? o1.IsEqualToOneOfThese([ "an", "a" ])
#--> 0
composed from the signature, run for this page
QCSXTZZZIBWU
IsLessThan
TRUE if the string sorts BEFORE the given one.
composed example
o1 = new stzStringComparator("rest_ababab")
? o1.IsLessThan("an")
#--> 0
composed from the signature, run for this page
no extension
IsGreaterThan
TRUE if the string sorts AFTER the given one.
composed example
o1 = new stzStringComparator("rest_ababab")
? o1.IsGreaterThan("an")
#--> 1
composed from the signature, run for this page
no extension
IsBetween
ordering
composed example
o1 = new stzStringComparator("rest_ababab")
? o1.IsBetween("an", "an")
#--> 0
composed from the signature, run for this page
QCSXTZZZIBWU
Compare
compare (returns -1, 0, 1)
composed example
o1 = new stzStringComparator("rest_ababab")
? o1.Compare("an")
#--> 1
composed from the signature, run for this page
QCSXTZZZIBWU
DiffWith
The differences between the string and the given one.
composed example
o1 = new stzStringComparator("rest_ababab")
? @@( o1.DiffWith("an") )
#--> [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ]
composed from the signature, run for this page
no extension
Contains
contains checks
composed example
o1 = new stzStringComparator("rest_ababab")
? o1.Contains("an")
#--> 0
composed from the signature, run for this page
QCSXTZZZIBWU
ContainsOneOfThese
contains checks
composed example
o1 = new stzStringComparator("rest_ababab")
? o1.ContainsOneOfThese([ "an", "a" ])
#--> 1
composed from the signature, run for this page
QCSXTZZZIBWU
ContainsAllOfThese
contains checks
composed example
o1 = new stzStringComparator("rest_ababab")
? o1.ContainsAllOfThese([ "an", "a" ])
#--> 0
composed from the signature, run for this page
QCSXTZZZIBWU
CommonPrefixWith
(no comment in the source: the name reads as a sentence) common prefix within the section common prefix / suffixQCSXTZZZIBWU
CommonSuffixWith
(no comment in the source: the name reads as a sentence) common suffix within the section common prefix / suffixQCSXTZZZIBWU
CommonCharsWith
(no comment in the source: the name reads as a sentence) common chars within the section common prefix / suffix
composed example
o1 = new stzStringComparator("rest_ababab")
? o1.CommonCharsWith("an")
#--> a
composed from the signature, run for this page
QCSXTZZZIBWU
CommonalityWith
(no comment in the source: the name reads as a sentence) commonality within the section common prefix / suffix
composed example
o1 = new stzStringComparator("rest_ababab")
? o1.CommonalityWith("an")
#--> 1
composed from the signature, run for this page
QCSXTZZZIBWU
DiffCharsWith
(no comment in the source: the name reads as a sentence) diff chars within the section common prefix / suffix
composed example
o1 = new stzStringComparator("rest_ababab")
? o1.DiffCharsWith("an")
#--> rest_b
composed from the signature, run for this page
QCSXTZZZIBWU
LevenshteinDistanceWith
The Levenshtein edit distance to the given string.also written: EditDistanceWith
composed example
o1 = new stzStringComparator("rest_ababab")
? o1.LevenshteinDistanceWith("an")
#--> 10
composed from the signature, run for this page
no extension
PrefixCountWith
prefix / suffix count
composed example
o1 = new stzStringComparator("rest_ababab")
? o1.PrefixCountWith("an")
#--> 0
composed from the signature, run for this page
QCSXTZZZIBWU
SuffixCountWith
prefix / suffix count
composed example
o1 = new stzStringComparator("rest_ababab")
? o1.SuffixCountWith("an")
#--> 0
composed from the signature, run for this page
QCSXTZZZIBWU
LongestCommonPrefixWith
longest common prefix / suffixQCSXTZZZIBWU
LongestCommonSuffixWith
longest common prefix / suffixQCSXTZZZIBWU
Soundex
The Soundex phonetic code of the string.
composed example
o1 = new stzStringComparator("rest_ababab")
? o1.Soundex()
#--> R231
composed from the signature, run for this page
no extension
Metaphone
The Metaphone phonetic code of the string.
composed example
o1 = new stzStringComparator("rest_ababab")
? o1.Metaphone()
#--> RSTBBB
composed from the signature, run for this page
no extension
JaroSimilarityWith
jaro / jaro-winkler similarityalso written: JaroDistanceWith
composed example
o1 = new stzStringComparator("rest_ababab")
? o1.JaroSimilarityWith("an")
#--> 0
composed from the signature, run for this page
no extension
JaroWinklerSimilarityWith
jaro / jaro-winkler similarityalso written: JaroWinklerDistanceWith
composed example
o1 = new stzStringComparator("rest_ababab")
? o1.JaroWinklerSimilarityWith("an")
#--> 0
composed from the signature, run for this page
no extension