Skip to content

UTF-16 version of validate_ascii #831

@trflynn89

Description

@trflynn89

Hello,

Would it be possible to add an ASCII validator for UTF-16 strings?

Our use case at Ladybird is that we deal with a lot of UTF-16 strings (technically, WTF-16). We have optimizations in place for strings that are actually ASCII, i.e. we use a char-based storage for these strings under-the-hood instead of a char16-based storage. As such, we find ourselves making ASCII validation checks quite a bit, which we currently do in quite a naive fashion by iterating over the code units.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions