Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Did you mean sscanf? You could for example parse a number into a double variable by using "sscanf(str, "%d", &x)"

You can even parse a whole line of a csv file with multiple numbers in one call "sscanf(str, "%d;%d;%d\n, &d1, &d2, &d3)"



No, the article lists sprintf/snprintf.

Another person already correctly pointed out that the author was listing a bunch of functions for number and string conversions in general.


printf makes no sense in this context, because the conversion happens in the other direction.

The article doesn't change that. It also lists scanf...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: