@std/string.ms#
Import each required symbol with import Name from "@std/string.ms".
NormalizationForm Enum#
The four Unicode normalization forms, as an enum so a misspelled form is a compile
error rather than a runtime EINVAL.
enum NormalizationForm {
Nfc
Nfd
Nfkc
Nfkd
}NormalizationForm.Nfc#
Canonical decomposition followed by canonical recomposition where Unicode permits it.
NfcNormalizationForm.Nfd#
Canonical decomposition with combining marks placed in canonical order.
NfdNormalizationForm.Nfkc#
Compatibility decomposition followed by canonical recomposition where Unicode permits it.
NfkcNormalizationForm.Nfkd#
Compatibility decomposition with combining marks placed in canonical order.
NfkdNormalizationForm.normalize#
Normalizes text to this form, with the same budget and errors as
String.normalize. When max_bytes is omitted or null the output is not
bounded; a supplied bound counts UTF-8 bytes.
fn normalize(text String, max_bytes Int? = null) Result[String, Error]SplitParts Type#
The text before and after the first (or last) separator, as returned by
split_once and rsplit_once.
type SplitParts {
before String
after String
}SplitParts.after#
The text after the separator.
after StringSplitParts.before#
The text before the separator.
before Stringfrom_scalars Function#
Builds text from Unicode scalar values. Invalid scalars return EINVAL.
fn from_scalars(values List[Int]) Result[String, Error] { ... }