mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-16 18:50:23 +02:00
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.
This commit is contained in:
parent
00d3ecf274
commit
9f0ec10fc9
5 changed files with 64 additions and 6 deletions
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue