Skip to content
FutureBlitz

    Install

    Import std.text.unicode

    Normalize

    std.text.unicode

    function

    @PanicsAtCaller Public Function Normalize(text: String, form: NormalForm = NormalForm.NFC): String

    text in the normal form form, so text that looks the same is the same: "é" as one character in NFC, and as "e" and its accent in NFD. Panics past the most a String holds.

    Examples

    Local composed = "\u{E9}"
    Local decomposed = "e\u{301}"
    Expect(composed != decomposed)
    Expect(Normalize(decomposed) == composed)
    Expect(Normalize(composed, NormalForm.NFD) == decomposed)

    std/text/unicode.fb, line 119

    Report an issue with this page or with FutureBlitz on GitHub.