Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 271 Bytes

File metadata and controls

17 lines (11 loc) · 271 Bytes

Count characters of a string in Perl 6

Code points

The codes method is available for strings (Str objects).

$count = $str.codes;

Grapheme clusters

The chars method is available for strings (Str objects).

$count = $str.chars;