Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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 standard library. Public Function

codePoint

Public Function
std.zon.Serializer.codePoint
pub fn codePoint(
    self: *Serializer,
    val: u21,
    options: CodePointOptions,
) CodePointError!void

Serialize val as a Unicode codepoint.

Returns error.InvalidCodepoint if val is not a valid Unicode codepoint.

Params

File

zon/Serializer.zig:297
297
298
299
300
301
302
303
304
305
306
307
308
pub fn codePoint(
    self: *Serializer,
    val: u21,
    options: CodePointOptions,
) CodePointError!void {
    try self.writer.writeByte('\'');
    try self.writeCodepoint(val, .{
        .escape_non_ascii = options.escape_non_ascii,
        .quote_style = .single,
    });
    try self.writer.writeByte('\'');
}