This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
clarify the pod for Perl_utf8_length()
authorDavid Mitchell <davem@iabyn.com>
Thu, 16 Nov 2017 09:32:41 +0000 (09:32 +0000)
committerDavid Mitchell <davem@iabyn.com>
Thu, 16 Nov 2017 09:45:56 +0000 (09:45 +0000)
It seemed to imply that the bytes making up the char were s..e; they're
actually s..(e-1).

NPD

utf8.c

diff --git a/utf8.c b/utf8.c
index b731780..31b7db7 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -2005,8 +2005,8 @@ Perl_utf8_to_uvuni_buf(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen)
 =for apidoc utf8_length
 
 Return the length of the UTF-8 char encoded string C<s> in characters.
-Stops at C<e> (inclusive).  If C<e E<lt> s> or if the scan would end
-up past C<e>, croaks.
+Stops at C<e> (i.e. the C<*e> byte does not form part of the character).
+If C<e E<lt> s> or if the scan would end up past C<e>, it croaks.
 
 =cut
 */