summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Humphrey <marvin@rectangular.com>2010-12-08 12:36:33 -0800
committerFather Chrysostomos <sprout@cpan.org>2010-12-08 16:56:01 -0800
commit9f7e3d64c241e7225e9cb83f0b0e97f55f68f8b2 (patch)
tree6a667f3558bf1fcad86a9ac847b9df17d5646bb8
parenta1fba7eb664f6fea65549e94672040d8e47c905e (diff)
downloadperl-9f7e3d64c241e7225e9cb83f0b0e97f55f68f8b2.tar.gz
Document use of strlen() by is_ascii_string(), is_utf8_string() and friends.
-rw-r--r--utf8.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/utf8.c b/utf8.c
index a818b3e0ba..e615d7b622 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<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().