summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2015-01-22 01:22:19 -0500
committerAndy Wingo <wingo@pobox.com>2016-05-22 19:03:37 +0200
commite390e5760b8811be04665e160d0eb79d3721c453 (patch)
treeddec7d4924e6a888645b6f5de5d2f0b7b1d72a26 /doc
parent751a55e3552547c84cc3cc0ad69fc6f26bd7251e (diff)
downloadguile-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')
-rw-r--r--doc/ref/api-data.texi8
-rw-r--r--doc/ref/guile.texi2
2 files changed, 8 insertions, 2 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]
diff --git a/doc/ref/guile.texi b/doc/ref/guile.texi
index 5f21188fa..cb4c431f2 100644
--- a/doc/ref/guile.texi
+++ b/doc/ref/guile.texi
@@ -14,7 +14,7 @@
This manual documents Guile version @value{VERSION}.
Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2009,
-2010, 2011, 2012, 2013, 2014 Free Software Foundation.
+2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or