4 ms·
> Write snprintf in C Another application of the `snprintf` function is `PyArg_ParseTuple` from CPython. [0] It's not exactly printing formatted output but par
by _RPM 10y ago
> Write snprintf in C
Another application of the `snprintf` function is `PyArg_ParseTuple` from CPython. [0] It's not exactly printing formatted output but parsing the args from the `va_list` based on the format. You pass it pointers and it assigns values to the pointers.
[0] https://docs.python.org/2/c-api/arg.html#c.PyArg_ParseTuple https://docs.python.org/2/c-api/arg.html#c.PyArg_ParseTuple
- akkartik 10y ago> Write snprintf in assembly See the implementation of interpolate in my Assembly-like language: http://akkartik.github.io/mu/html/070text.mu.html http://akkartik.github.io/mu/html/070text.mu.html (search for 'interpolate'. There's also unit tests: the scenarios after the definition) More details: http://akkartik.name/post/mu http://akkartik.name/post/mu