#Easy parser?
1 messages · Page 1 of 1 (latest)
1 messages · Page 1 of 1 (latest)
I just started Advent of Code 2024 and i need an easy way to parse files, kinda like c's fscanf. Is there something similar for Zig? Thanks.
std.mem.tokenizeAny into std.fmt.parseInt is quite easy.
No. In Zig things are more separate parts, and not kitchen sinks like fscanf. You read the data into a buffer, then parse the data (e.g. std.fmt.parseFloat, parseInt*).