Functions

fn parseAlloc(allocator: std.mem.Allocator, bytes: []const u8) ParseError![]u8

Higher level API. Does not return extra info about parse errors. Caller owns re…

Higher level API. Does not return extra info about parse errors. Caller owns returned memory.

fn parseCharLiteral(slice: []const u8) ParsedCharLiteral

Only validates escape sequence characters. Slice must be valid utf8 starting an…

Only validates escape sequence characters. Slice must be valid utf8 starting and ending with “’” and exactly one codepoint in between.

fn parseEscapeSequence(slice: []const u8, offset: *usize) ParsedCharLiteral

Parse an escape sequence from slice[offset..]. If parsing is successful, offs…

Parse an escape sequence from slice[offset..]. If parsing is successful, offset is updated to reflect the characters consumed.

fn parseWrite(writer: anytype, bytes: []const u8) error{OutOfMemory}!Result

Parses bytes as a Zig string literal and writes the result to the std.io.Write…

Parses bytes as a Zig string literal and writes the result to the std.io.Writer type. Asserts bytes has ‘”’ at beginning and end.

Error Sets