diff options
author | Mark H Weaver <mhw@netris.org> | 2015-01-22 01:22:19 -0500 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2016-05-22 19:03:37 +0200 |
commit | e390e5760b8811be04665e160d0eb79d3721c453 (patch) | |
tree | ddec7d4924e6a888645b6f5de5d2f0b7b1d72a26 /doc/ref/api-data.texi | |
parent | 751a55e3552547c84cc3cc0ad69fc6f26bd7251e (diff) | |
download | guile-e390e5760b8811be04665e160d0eb79d3721c453.tar.gz |
Implement 'string-utf8-length' and 'scm_c_string_utf8_length'.
* libguile/strings.c (utf8_length, scm_c_string_utf8_length)
(scm_string_utf8_length): New functions.
* libguile/strings.h (scm_c_string_utf8_length, scm_string_utf8_length):
New prototypes.
* doc/ref/api-data.texi (Bytevectors as Strings): Add docs.
* doc/ref/guile.texi: Update manual copyright date to 2015.
* test-suite/tests/strings.test (string-utf8-length): Add tests.
Diffstat (limited to 'doc/ref/api-data.texi')
-rw-r--r-- | doc/ref/api-data.texi | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/ref/api-data.texi b/doc/ref/api-data.texi index 3f787b1c9..3a3a8e4ac 100644 --- a/doc/ref/api-data.texi +++ b/doc/ref/api-data.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Guile Reference Manual. -@c Copyright (C) 1996, 1997, 2000-2004, 2006-2014 +@c Copyright (C) 1996, 1997, 2000-2004, 2006-2015 @c Free Software Foundation, Inc. @c See the file guile.texi for copying conditions. @@ -4983,6 +4983,12 @@ in one of the most commonly available encoding formats. @result{} #vu8(99 97 102 195 169) @end lisp +@deftypefn {Scheme Procedure} {} string-utf8-length str +@deftypefnx {C function} SCM scm_string_utf8_length (str) +@deftypefnx {C function} size_t scm_c_string_utf8_length (str) +Return the number of bytes in the UTF-8 representation of @var{str}. +@end deftypefn + @deffn {Scheme Procedure} string->utf8 str @deffnx {Scheme Procedure} string->utf16 str [endianness] @deffnx {Scheme Procedure} string->utf32 str [endianness] |