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. Private Function

endOfBufferInNumber

Private Function
std.json.Scanner.endOfBufferInNumber
fn endOfBufferInNumber(self: *@This(), allow_end: bool) !Token

Params

  • self: *@This()
  • allow_end: bool

File

json/Scanner.zig:1338
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
fn endOfBufferInNumber(self: *@This(), allow_end: bool) !Token {
    const slice = self.takeValueSlice();
    if (self.is_end_of_input) {
        if (!allow_end) return error.UnexpectedEndOfInput;
        self.state = .post_value;
        return Token{ .number = slice };
    }
    if (slice.len == 0) return error.BufferUnderrun;
    return Token{ .partial_number = slice };
}