Module string/unicode

string/unicode

Unicode-aware case conversion using full case folding rules.

Example

{ unicode_to_lowercase, unicode_to_uppercase } :: import "std/string/unicode";

lower := unicode_to_lowercase(`HELLO WÖRLD`);  // "hello wörld"
upper := unicode_to_uppercase(`hello wörld`);  // "HELLO WÖRLD"

Functions

fn(input : String) -> String

Convert a String to lowercase using Unicode case mapping rules. Handles both ASCII and non-ASCII codepoints, plus special multi-char expansions (e.g., ẞ → ss).

Parameters

NameTypeNotes
inputString

Returns: String

fn(input : String) -> String

Convert a String to uppercase using Unicode case mapping rules. Handles both ASCII and non-ASCII codepoints, plus special multi-char expansions (e.g., ß → SS).

Parameters

NameTypeNotes
inputString

Returns: String