mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-01 13:23:07 +02:00
gstrfuncs: Clarify that g_ascii_string_to_unsigned() rejects signs
Unlike g_ascii_strtoull(), g_ascii_string_to_unsigned() does not permit leading signs (`+` or `-`). Document that. It’s already in the unit tests. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
8d0a163000
commit
96acb49eb1
@ -3309,7 +3309,8 @@ g_ascii_string_to_signed (const gchar *str,
|
|||||||
* @base that is within inclusive bounds limited by @min and @max. If
|
* @base that is within inclusive bounds limited by @min and @max. If
|
||||||
* this is true, then the converted number is stored in @out_num. An
|
* this is true, then the converted number is stored in @out_num. An
|
||||||
* empty string is not a valid input. A string with leading or
|
* empty string is not a valid input. A string with leading or
|
||||||
* trailing whitespace is also an invalid input.
|
* trailing whitespace is also an invalid input. A string with a leading sign
|
||||||
|
* (`-` or `+`) is not a valid input for the unsigned parser.
|
||||||
*
|
*
|
||||||
* @base can be between 2 and 36 inclusive. Hexadecimal numbers must
|
* @base can be between 2 and 36 inclusive. Hexadecimal numbers must
|
||||||
* not be prefixed with "0x" or "0X". Such a problem does not exist
|
* not be prefixed with "0x" or "0X". Such a problem does not exist
|
||||||
|
Loading…
x
Reference in New Issue
Block a user