Skip to content

Commit 00669ae

Browse files
committed
Fixes unimatch example.
Closes #3509. Also grammar fixes, and added explanation.
1 parent a58eac0 commit 00669ae

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

doc/Type/Cool.pod6

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,14 +1070,17 @@ Defined as:
10701070
multi sub unimatch(Str:D $str, |c)
10711071
multi unimatch(Int:D $code, Stringy:D $pvalname, Stringy:D $propname = $pvalname)
10721072
1073-
Checks if the given integer codepoint or the first letter of the string given
1074-
have a unicode property equal to the value you give. If you supply the Unicode
1073+
Checks if the given integer codepoint or the first letter of the given string
1074+
has a unicode property equal to the value you give. If you supply the Unicode
10751075
property to be checked it will only return True if that property matches the
10761076
given value.
10771077
10781078
say unimatch 'A', 'Latin'; # OUTPUT: «True␤»
10791079
say unimatch 'A', 'Latin', 'Script'; # OUTPUT: «True␤»
1080-
say unimatch 'A', 'Ll'; # OUTPUT: «True␤»
1080+
say unimatch 'A', 'Ll'; # OUTPUT: «False␤»
1081+
1082+
The last property corresponds to "lowercase letter", which explains why it
1083+
returns false.
10811084
10821085
=head2 routine chop
10831086

0 commit comments

Comments
 (0)