Skip to content

Commit 12ec5fc

Browse files
authored
Correct and expand on the documentation of ords.
1 parent c4a4116 commit 12ec5fc

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

doc/Type/Str.pod6

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -900,13 +900,20 @@ Example:
900900
901901
multi method ords(Str:D:) returns Positional
902902
903-
Returns a list of codepoint numbers, one for the base character of each
904-
grapheme in the string.
903+
Returns a list of Unicode codepoint numbers that describe the codepoints making up the string.
905904
906905
Example:
907906
908907
"aå«".ords; # (97 229 171)
909908
909+
Strings are represented as graphemes. If a character in the string is represented by multiple
910+
codepoints, then all of those codepoints will appear in the result of C<ords>. Therefore, the
911+
number of elements in the result may not always be equal to L<chars>, but will be equal to
912+
L<codes>.
913+
914+
The codepoints returned will represent the string in L<NFC>. See the L<NFD>, L<NFKC>, and
915+
C<NFKD> methods if other forms are required.
916+
910917
=head2 method trans
911918
912919
proto method trans(|)

0 commit comments

Comments
 (0)