Document use of strlen() by is_ascii_string(), is_utf8_string() and friends.
authorMarvin Humphrey <marvin@rectangular.com>
Wed, 8 Dec 2010 20:36:33 +0000 (12:36 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 9 Dec 2010 00:56:01 +0000 (16:56 -0800)
utf8.c

diff --git a/utf8.c b/utf8.c
index a818b3e..e615d7b 100644 (file)
--- 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<len> is 0, it will be calculated using C<strlen(s)>.  
+
 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<len> 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<len> is 0, it will be calculated
+using C<strlen(s)>.  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().