File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -195,7 +195,9 @@ character or a list of characters.
195
195
dd $s;
196
196
# OUTPUT: «Str $s = "I really ♡♥❤💕 Perl 6!"»
197
197
198
- You can also use unicode names with C < \c[] > .
198
+ You can also use C < L « unicode names|language/unicode#Entering_Unicode_Codepoints_and_Codepoint_Sequences » >
199
+ , L < named sequences|https://docs.perl6.org/language/unicode#Named_Sequences >
200
+ and L < name aliases|language/unicode#Name_Aliases > with C < L « \c[]|language/unicode#Entering_Unicode_Codepoints_and_Codepoint_Sequences » > .
199
201
200
202
my $s = "Camelia \c[BROKEN HEART] my \c[HEAVY BLACK HEART]!";
201
203
dd $s;
Original file line number Diff line number Diff line change 4
4
5
5
= SUBTITLE Unicode Support in Perl 6
6
6
7
- Perl 6 has a high level of support of Unicode.
7
+ Perl 6 has a high level of support of Unicode. This document aims to be both an
8
+ overview as well as describe Unicode features which don't belong in the documentation
9
+ for routine's and methods.
10
+
11
+ = head1 Entering Unicode Codepoints and Codepoint Sequences
8
12
9
13
You can access Unicode codepoints by name:
10
- Rakudo supports all Unicode 9.0 names.
14
+ Rakudo supports all Unicode 9.0 names. X < |\c[] unicode name >
11
15
12
16
say "\c[PENGUIN]"; # OUTPUT: «🐧»
13
17
say "\c[BELL]"; # OUTPUT: «🔔» (U+1F514 BELL)
14
18
15
- Additionally, all Unicode codepoint names/named seq/emoji sequences are now case-insensitive:
19
+ All Unicode codepoint names/named seq/emoji sequences are now case-insensitive:
16
20
[Starting in 2017.02]
17
21
18
22
say "\c[latin capital letter E]"; # OUTPUT: «E» (U+0045)
19
23
20
- = head1 Entering Unicode Codepoints and Codepoint Sequences
24
+ In addition to using C < \c[] > inside interpolated strings, you can also use
25
+ the L < parse-names routine|routine/parse-names#(Str)_routine_parse-names >
26
+ or the parse-names method.
27
+
28
+ say "DIGIT ONE".parse-names; # OUTPUT: «1»
29
+ say parse-names("DIGIT ONE"); # OUTPUT: «1»
21
30
22
31
= head2 Name Aliases
23
32
You can’t perform that action at this time.
0 commit comments