fc used for case insensitivity.
uc($a) cmp uc($b)
lc($a) cmp lc($b)
fc($a) cmp fc($b)
An example where it matters:
lc uc fc
-- -- -- --
ss ss SS ss
SS ss SS ss
ß ß SS ss
ẞ ß ẞ ss
Note that fc ("ß") eq fc ("ẞ"), but uc ("ß") ne uc ("ẞ").
Note that fc ("ß") eq fc ("ss"), but lc ("ß") ne lc ("ss").
The table was generated using
use strict;
use warnings;
use feature qw( fc );
use open ':std', ':encoding(UTF-8)';
my $ss = "\N{LATIN SMALL LETTER SHARP S}";
my $SS = "\N{LATIN CAPITAL LETTER SHARP S}";
printf(" lc uc fc\n");
printf("-- -- -- --\n");
printf("%-2s %-2s %-2s %-2s\n", $_, lc($_), uc($_), fc($_))
for 'ss', 'SS', $ss, $SS;
source
share