Skip to content

Instantly share code, notes, and snippets.

@thundergnat
Created February 15, 2023 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thundergnat/da95afab6b5656b895bc6f6e4854c8a7 to your computer and use it in GitHub Desktop.
Save thundergnat/da95afab6b5656b895bc6f6e4854c8a7 to your computer and use it in GitHub Desktop.
Full names for Unicode properties
my %properties = L => '(Letter)',
Lu => '(Letter, uppercase)',
Ll => '(Letter, lowercase)',
Lt => '(Letter, titlecase)',
Lm => '(Letter, modifier)',
Lo => '(Letter, other)',
M => '(Mark)',
Mn => '(Mark, nonspacing)',
Mc => '(Mark, spacing combining)',
Me => '(Mark, enclosing)',
N => '(Number)',
Nd => '(Number, decimal digit)',
Nl => '(Number, letter)',
No => '(Number, other)',
P => '(Punctuation)',
Pc => '(Punctuation, connector)',
Pd => '(Punctuation, dash)',
Ps => '(Punctuation, open bracket)',
Pe => '(Punctuation, close bracket)',
Pi => '(Punctuation, initial quote)',
Pf => '(Punctuation, final quote)',
Po => '(Punctuation, other)',
S => '(Symbol)',
Sm => '(Symbol, math)',
Sc => '(Symbol, currency)',
Sk => '(Symbol, modifier)',
So => '(Symbol, other)',
Z => '(Separator)',
Zs => '(Separator, space)',
Zl => '(Separator, line)',
Zp => '(Separator, paragraph)',
C => '(Other)',
Cc => '(Other, control)',
Cf => '(Other, format)',
Cs => '(Other, surrogate)',
Co => '(Other, private use)',
Cn => '(Other, not assigned)';
my $text = 'Raku!«🦋 :-)⒈';
say $text.uniprops;
say %properties{$text.uniprops}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment