String
Codepoint-correct superset of Python and Rust str; the clear gap is ICU's locale layer.
6 Strong · 4 Solid · 1 Partial · 1 Emerging
Measured against: ICU · Rust/Python str · Boost.Locale · Folders: base/string(opens in a new tab) · For programmers: this area's reference

Rethought from first principles
What Softanza kept from what works, and what it rethought, as the library wrote it down in its design documents and narrations.
The Softanza wayA string is a sequence of characters a person reads, counted in Unicode code points, never in the bytes a machine stores.
Kept from the best practice
- Case rules come from the Unicode standard through utf8proc, so case-insensitive search folds German ß to ss instead of using ASCII-only tricks. source(opens in a new tab)
- Whitespace follows Unicode, which defines more than 25 space characters, so trimming also removes no-break and ideographic spaces. source(opens in a new tab)
- Identity follows Unicode: two characters are equal only when their code points match, so look-alike Latin, Greek and Cyrillic letters stay distinct and detectable. source(opens in a new tab)
Rethought
- Every position and length counts code points, not bytes, so text in Hebrew, Arabic or emoji is never cut through the middle of a character. source(opens in a new tab)
- Positions start at 1, as people count, at every layer including the compiled engine, which removes a whole class of off-by-one errors. source(opens in a new tab)
- The empty string is never counted, found, contained, replaced or removed, because a match on nothing can silently delete a real character. source(opens in a new tab)
- Case sensitivity is one parameter of a single function, not a second twin function, which halves the number of functions to learn. source(opens in a new tab)
Softanza's string is one Zig engine (utf8proc + PCRE2 + SheenBidi/HarfBuzz) behind a 2,212-method Haro face that is codepoint-correct end to end and reaches from core slicing through similarity, formatting and text analytics: a genuine superset of Python/Rust str. What it deliberately is not is ICU: no locale collation, no CLDR, no legacy charset transcoding.
What a crafter does with it, and what stands out
- A genuine superset of Python/Rust str on breadth and Unicode-correctness
- Between/sections finder vocabulary wider than any str library exposes
- A similarity and distance lane that ICU does not even enter
- Formatting and text-analytics lanes general str libraries do not have
What is owed
- Locale-aware collation + CLDR foundation (ICU's crown jewel)
- Finish the narration audit: ~736 of 999 blocks unproven
- Legacy charset transcoding (Shift-JIS, GBK, ISO-8859-*, Windows-125x)
- Grapheme-cluster cursor (UAX#29) and line-break (UAX#14) primitives
The Softanza way, run
What Softanza does differently in this area, shown by code taken from its narrations and guards, and run for this page.
The empty string is never contained, not even in itself, so a match on nothing can never trigger an edit.
? Q("").Contains("")
? Q("").Contains("text")
? Q("text").Contains("")0 0 0
run on 2026-10-01 21:17 inside the library at commit 0e72e2e2c; taken from base/doc/narrations/stzstring-emptiness-narration.md(opens in a new tab)
Length counts characters, not bytes: the accented word héllo has five characters although it takes six bytes.
Then("NumberOfChars('héllo') is 5 (not byte count)", Q("héllo").NumberOfChars(), 5) THEN NumberOfChars('héllo') is 5 (not byte count) [PASS]run on 2026-10-01 21:17 inside the library at commit 0e72e2e2c; taken from base/test/string/00_string_narrated.ring(opens in a new tab)
Three letters that look identical are told apart by their code points and their scripts: Latin, Greek and Cyrillic.
? AreEqual(["O", "Ο", "О"]) ? Unicodes(["O", "Ο", "О"]) ? Scripts(["O", "Ο", "О"])
0 79 927 1054 latin greek cyrillic
run on 2026-10-01 21:17 inside the library at commit 0e72e2e2c; taken from base/doc/narrations/stz-unmasking-unicode-lookalities-narration.md(opens in a new tab)
The articles of this area (11)
- InsertSubstrings(): A Powerful String Manipulation Tool in Softanza 2024
- Softanza: Simplifying the Power of C++ Backends for Unicode Handling 2024
- An overview of String Art support in Softanza 2024
- Visual Sequence Finding in Softanza 2024
- Five Practical Applications on Strings of the / Operator in Softanza 2024
- Emptiness in Strings, Clear Rules: The Softanza Way 2024
- Simplifying Orientation in String Removal with Softanza 2024
- Mastering Precision with the Sit() Function 2024
- Decoding Duplicates: Exploring Duplicate Detection and Removal with Softanza 2024
- Managing Over Spaces in Softanza: Beyond Simplify, Trim, and RemoveSpaces 2024
- Unmasking Unicode Lookalikes 2024
The lanes, one by one
Lanes and their notes are quoted as they were read at the source, on Read from the source on 2026-09-16.

