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.

testErrorEncode

unicode.testErrorEncode
fn testErrorEncode(codePoint: u21, array: []u8, expectedErr: anyerror) !void

File

lib/std/unicode.zig:595

Code

fn testErrorEncode(codePoint: u21, array: []u8, expectedErr: anyerror) !void {
    try testing.expectError(expectedErr, utf8Encode(codePoint, array));
}