This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Simplify foldEQ_utf8
This moves the uncommon case of handling inputs under non-UTF-8 locales
out of this function to the functions it calls, which already have the
logic to handle it. This simplifies this function, cutting a couple
branches each time through the loop from the common usage.
The locale handling is slowed down somewhat, but even if that were a
concern, another simpler function is normally used for locale handling.
This gets called only when one or both of the comparison strings is
UTF-8, which should be comparatively rare for non-UTF8 locales.