From 9f7e3d64c241e7225e9cb83f0b0e97f55f68f8b2 Mon Sep 17 00:00:00 2001 From: Marvin Humphrey Date: Wed, 8 Dec 2010 12:36:33 -0800 Subject: [PATCH] Document use of strlen() by is_ascii_string(), is_utf8_string() and friends. --- utf8.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/utf8.c b/utf8.c index a818b3e..e615d7b 100644 --- a/utf8.c +++ b/utf8.c @@ -62,6 +62,8 @@ or not the string is encoded in UTF-8 (or UTF-EBCDIC on EBCDIC machines). That is, if they are invariant. On ASCII-ish machines, only ASCII characters fit this definition, hence the function's name. +If C is 0, it will be calculated using C. + See also is_utf8_string(), is_utf8_string_loclen(), and is_utf8_string_loc(). =cut @@ -303,9 +305,10 @@ Perl_is_utf8_char(const U8 *s) =for apidoc is_utf8_string Returns true if first C bytes of the given string form a valid -UTF-8 string, false otherwise. Note that 'a valid UTF-8 string' does -not mean 'a string that contains code points above 0x7F encoded in UTF-8' -because a valid ASCII string is a valid UTF-8 string. +UTF-8 string, false otherwise. If C is 0, it will be calculated +using C. Note that 'a valid UTF-8 string' does not mean 'a +string that contains code points above 0x7F encoded in UTF-8' because a +valid ASCII string is a valid UTF-8 string. See also is_ascii_string(), is_utf8_string_loclen(), and is_utf8_string_loc(). -- 2.7.4