diff options
author | Mark H Weaver <mhw@netris.org> | 2015-01-22 01:22:19 -0500 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2015-03-01 22:04:07 -0500 |
commit | 9f0ec10fc91309367d7fede1844720fd781c357e (patch) | |
tree | 165545027fef887da0fa791c5c064ffd74983cc0 /doc/ref/api-data.texi | |
parent | 00d3ecf27408982a4c4ff6baad4f7c2592d7cb5a (diff) | |
download | guile-9f0ec10fc91309367d7fede1844720fd781c357e.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 d98c93862..c39ab91c0 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. @@ -4966,6 +4966,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] |