Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

isNonAsciiDigit

Emulates the Windows implementation of iswdigit, but only returns true for the non-ASCII digits that iswdigit on Windows would return true for.

utils.isNonAsciiDigit
pub fn isNonAsciiDigit(c: u21) bool

File

Code

pub fn isNonAsciiDigit(c: u21) bool {
    return switch (c) {
        '²',
        '³',
        '¹',
        '\u{660}'...'\u{669}',
        '\u{6F0}'...'\u{6F9}',
        '\u{7C0}'...'\u{7C9}',
        '\u{966}'...'\u{96F}',
        '\u{9E6}'...'\u{9EF}',
        '\u{A66}'...'\u{A6F}',
        '\u{AE6}'...'\u{AEF}',
        '\u{B66}'...'\u{B6F}',
        '\u{BE6}'...'\u{BEF}',
        '\u{C66}'...'\u{C6F}',
        '\u{CE6}'...'\u{CEF}',
        '\u{D66}'...'\u{D6F}',
        '\u{E50}'...'\u{E59}',
        '\u{ED0}'...'\u{ED9}',
        '\u{F20}'...'\u{F29}',
        '\u{1040}'...'\u{1049}',
        '\u{1090}'...'\u{1099}',
        '\u{17E0}'...'\u{17E9}',
        '\u{1810}'...'\u{1819}',
        '\u{1946}'...'\u{194F}',
        '\u{19D0}'...'\u{19D9}',
        '\u{1B50}'...'\u{1B59}',
        '\u{1BB0}'...'\u{1BB9}',
        '\u{1C40}'...'\u{1C49}',
        '\u{1C50}'...'\u{1C59}',
        '\u{A620}'...'\u{A629}',
        '\u{A8D0}'...'\u{A8D9}',
        '\u{A900}'...'\u{A909}',
        '\u{AA50}'...'\u{AA59}',
        '\u{FF10}'...'\u{FF19}',
        => true,
        else => false,
    };
}