[glib] Clarify g_utf8_strlen docs a bit
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Clarify g_utf8_strlen docs a bit
- Date: Wed, 4 Jan 2012 05:10:26 +0000 (UTC)
commit 1b919d2e5643b43c27f86d4bcf2d94f7bf98e7df
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jan 4 00:10:11 2012 -0500
Clarify g_utf8_strlen docs a bit
glib/gutf8.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/glib/gutf8.c b/glib/gutf8.c
index 17d4273..e1e0003 100644
--- a/glib/gutf8.c
+++ b/glib/gutf8.c
@@ -220,10 +220,12 @@ g_utf8_prev_char (const gchar *p)
* @max: the maximum number of bytes to examine. If @max
* is less than 0, then the string is assumed to be
* nul-terminated. If @max is 0, @p will not be examined and
- * may be %NULL.
+ * may be %NULL. If @max is greater than 0, up to @max
+ * bytes are examined
*
* Computes the length of the string in characters, not including
- * the terminating nul character.
+ * the terminating nul character. If the @max'th byte falls in the
+ * middle of a character, the last (partial) character is not counted.
*
* Return value: the length of the string in characters
**/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]