2 ms·
Languages that cannot deal with graphemes are lame. I daresay this solution below should score 20 in OP's imaginary scale. $ perl -CADS -E'say $ARGV[0] =~
by bmn_ 11y ago
Languages that cannot deal with graphemes are lame. I daresay this solution below should score 20 in OP's imaginary scale.
$ perl -CADS -E'say $ARGV[0] =~ /(\X{5})/' देवनागरीदेवनागरी
देवनागरी
Length of input string is: 10 graphemes, 16 codepoints, 48 octets (UTF-8).
Length of output string is: 5 graphemes, 8 codepoints, 24 octets (UTF-8).