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.

isSupported

code_pages.isSupported
pub fn isSupported(code_page: CodePage) bool

File

lib/compiler/resinator/code_pages.zig:192

Code

pub fn isSupported(code_page: CodePage) bool {
    inline for (@typeInfo(SupportedCodePage).@"enum".field_names) |field_name| {
        if (@backingInt(code_page) == @backingInt(@field(SupportedCodePage, field_name))) {
            return true;
        }
    }
    return false;
}