- or download this
sub length_in_grapheme_clusters {
my $length;
$length++ while $_[0] =~ m/\X/g;
return $length;
}
- or download this
sub length_in_grapheme_clusters {
my $length = () = $_[0] =~ /\X/g;
return $length;
}
- or download this
sub length_in_grapheme_clusters {
return 0+( () = $_[0] =~ /\X/g );
}