• Walnut356@programming.dev
    link
    fedilink
    arrow-up
    35
    ·
    edit-2
    1 year ago

    That depends on your definition of correct lmao. Rust explicitly counts utf-8 scalar values, because that’s the length of the raw bytes contained in the string. There are many times where that value is more useful than the grapheme count.