Skip to content

Commit e79fa57

Browse files
committed
better example for Cool::uniname (AlexDaniel++)
1 parent 542ca73 commit e79fa57

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

doc/Type/Cool.pod

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -894,8 +894,13 @@ Defined as:
894894
895895
Usage:
896896
897-
uniname STRING
898-
STRING.uniname
897+
# Camelia in Unicode
898+
say '»ö«'.uniname;
899+
«RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK␤»
900+
901+
# Find the char with the longest Unicode name.
902+
say (0..0x1FFFF).sort(*.uniname.chars)[*-2].chr.uniname;
903+
# «ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA INITIAL FORM␤»
899904
900905
Interprets the invocant / first argument as a L</type/Str>, and returns the
901906
Unicode codepoint name of the first character.

0 commit comments

Comments
 (0)