Forgive me but I'm pretty new to Zig and need to convert an integer (e.g. i32
) into a string for display purposes. What's the idiomatic way to do this in Zig at runtime, and are there different approaches depending on the integer type or allocation needs?
What is the proper way to parse an integer from a string in Zig, while being able to specify the resulting integer type? How would I convert foo
to an i32
, for example?