mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
4fe89b0437
Very often when we want to convert a string to number, we assume that the string contains only a number. We have g_ascii_strto* family of functions to do the conversion but they are awkward to use - one has to check if errno is zero, end_ptr is not NULL and *end_ptr points to the terminating nul and then do the bounds checking. Many projects need this kind of functionality, so it gets reimplemented all the time. This commit adds some replacement functions that convert a string to a signed or unsigned number that also follows the usual way of error reporting - returning FALSE on failure and filling an error output parameter. |
||
---|---|---|
.. | ||
reference | ||
debugging.txt | ||
macros.txt | ||
Makefile.am |