Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.95k stars 554 forks source link

Add utf8_hop functions that return error detection #22689

Open khwilliamson opened 19 hours ago

khwilliamson commented 19 hours ago

These commits add versions of the utf8_hop functions that return extra information that can tell the caller if the request could not be completely filled. This will help simplify several portions of the perl core.

The function names end with _overshoot that indicate to return how far the function call would have overshot the edge of the string if that had been allowed to happen. I'm open to a better name, but I didn't find one in a thesaurus.

Once this is settled, I can write the perldelta