From 0df07abdb1dbae63d2af8327cc269288c0adb8bd Mon Sep 17 00:00:00 2001 From: Damon Chaplin Date: Sat, 1 Jul 2000 22:45:11 +0000 Subject: updated g_strndup. 2000-07-01 Damon Chaplin * tmpl/string_utils.sgml: updated g_strndup. --- docs/reference/ChangeLog | 4 ++++ docs/reference/glib/glib/ChangeLog | 4 ++++ docs/reference/glib/tmpl/string_utils.sgml | 12 ++++++------ 3 files changed, 14 insertions(+), 6 deletions(-) (limited to 'docs') diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index a4c80f544..6f682b1ba 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,7 @@ +2000-07-01 Damon Chaplin + + * tmpl/string_utils.sgml: updated g_strndup. + 2000-06-11 Damon Chaplin * tmpl/messages.sgml: updated a bit more. diff --git a/docs/reference/glib/glib/ChangeLog b/docs/reference/glib/glib/ChangeLog index a4c80f544..6f682b1ba 100644 --- a/docs/reference/glib/glib/ChangeLog +++ b/docs/reference/glib/glib/ChangeLog @@ -1,3 +1,7 @@ +2000-07-01 Damon Chaplin + + * tmpl/string_utils.sgml: updated g_strndup. + 2000-06-11 Damon Chaplin * tmpl/messages.sgml: updated a bit more. diff --git a/docs/reference/glib/tmpl/string_utils.sgml b/docs/reference/glib/tmpl/string_utils.sgml index 2362f7782..fe8566f37 100644 --- a/docs/reference/glib/tmpl/string_utils.sgml +++ b/docs/reference/glib/tmpl/string_utils.sgml @@ -27,15 +27,15 @@ The returned string should be freed when no longer needed. -Duplicates the first @n characters of a string, and null-terminates it. -If @str is NULL, NULL is returned. -The returned string should be freed when no longer needed. +Duplicates the first @n characters of a string, returning a newly-allocated +buffer @n + 1 characters long which will always be null-terminated. +If @str is less than @n characters long the buffer is padded with nulls. +The returned value should be freed when no longer needed. @str: the string to duplicate part of. -@n: the number of characters to copy, which must be less than or equal to the -length of @str. -@Returns: a newly-allocated copy of the first @n characters of @str, +@n: the maximum number of characters to copy from @str. +@Returns: a newly-allocated buffer containing the first @n characters of @str, null-terminated. -- cgit v1.2.1