mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-23 18:52:09 +01:00
gutf8: Clarify position of end returned from g_utf8_validate()
It wasn’t previously clear (to me) whether `end` was returned pointing to the nul terminator, or to the byte immediately preceding it. Try and clarify that. Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
parent
7302c04e32
commit
f8ba505dc1
@ -1747,9 +1747,10 @@ fast_validate_len (const char *str,
|
|||||||
* @str is the text to validate; if @str is nul-terminated, then @max_len can be
|
* @str is the text to validate; if @str is nul-terminated, then @max_len can be
|
||||||
* `-1`, otherwise @max_len should be the number of bytes to validate.
|
* `-1`, otherwise @max_len should be the number of bytes to validate.
|
||||||
*
|
*
|
||||||
* If @end is non-`NULL`, then the end of the valid range will be stored there
|
* If @end is non-`NULL`, then the end of the valid range will be stored there.
|
||||||
* (i.e. the start of the first invalid character if some bytes were invalid,
|
* This is the first byte of the first invalid character if some bytes were
|
||||||
* or the end of the text being validated otherwise).
|
* invalid, or the end of the text being validated otherwise — either the
|
||||||
|
* trailing nul byte, or the first byte beyond @max_len (if it’s positive).
|
||||||
*
|
*
|
||||||
* Note that `g_utf8_validate()` returns `FALSE` if @max_len is positive and
|
* Note that `g_utf8_validate()` returns `FALSE` if @max_len is positive and
|
||||||
* any of the @max_len bytes are nul.
|
* any of the @max_len bytes are nul.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user