Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
updated g_strndup.
Browse files Browse the repository at this point in the history
2000-07-01  Damon Chaplin  <damon@helixcode.com>

	* tmpl/string_utils.sgml: updated g_strndup.
  • Loading branch information
Damon Chaplin authored and Damon Chaplin committed Jul 1, 2000
1 parent 3250d07 commit 0df07ab
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
4 changes: 4 additions & 0 deletions docs/reference/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2000-07-01 Damon Chaplin <damon@helixcode.com>

* tmpl/string_utils.sgml: updated g_strndup.

2000-06-11 Damon Chaplin <damon@helixcode.com>

* tmpl/messages.sgml: updated a bit more.
Expand Down
4 changes: 4 additions & 0 deletions docs/reference/glib/glib/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2000-07-01 Damon Chaplin <damon@helixcode.com>

* tmpl/string_utils.sgml: updated g_strndup.

2000-06-11 Damon Chaplin <damon@helixcode.com>

* tmpl/messages.sgml: updated a bit more.
Expand Down
12 changes: 6 additions & 6 deletions docs/reference/glib/tmpl/string_utils.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ The returned string should be freed when no longer needed.

<!-- ##### FUNCTION g_strndup ##### -->
<para>
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.
</para>

@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.


Expand Down

0 comments on commit 0df07ab

Please sign in to comment.