Manuscript Documentation
v2026.12.0

@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.

Manuscript
enum NormalizationForm {
    Nfc
    Nfd
    Nfkc
    Nfkd
}

NormalizationForm.Nfc#

Canonical decomposition followed by canonical recomposition where Unicode permits it.

Manuscript
Nfc

NormalizationForm.Nfd#

Canonical decomposition with combining marks placed in canonical order.

Manuscript
Nfd

NormalizationForm.Nfkc#

Compatibility decomposition followed by canonical recomposition where Unicode permits it.

Manuscript
Nfkc

NormalizationForm.Nfkd#

Compatibility decomposition with combining marks placed in canonical order.

Manuscript
Nfkd

NormalizationForm.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.

Manuscript
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.

Manuscript
type SplitParts {
    before String
    after String
}

SplitParts.after#

The text after the separator.

Manuscript
after String

SplitParts.before#

The text before the separator.

Manuscript
before String

from_scalars Function#

Builds text from Unicode scalar values. Invalid scalars return EINVAL.

Manuscript
fn from_scalars(values List[Int]) Result[String, Error] { ... }