Documentation for routine
codes assembled from the following types:
method codes(Uni: --> Int)
Returns the number of codepoints in the invocant.
sub codes(Str(Cool))method codes()
say 'møp'.codes; # OUTPUT: «3␤»
The same result will be obtained with
say +'møp'.ords; # OUTPUT: «3␤»
ords first obtains the actual codepoints, so there might be a difference in speed.