@@ -858,21 +858,36 @@ C<$pattern> is applied to the remaining characters of C<$string>.
858
858
say "perL 6".samecase("A__a__"); # Perl 6
859
859
say "pERL 6".samecase("Ab"); # Perl 6
860
860
861
- = head2 method uniprop
861
+ = head2 routine uniprop
862
862
863
863
Defined as:
864
864
sub uniprop(Str(Cool), |c)
865
- method uniprop(|c)
865
+ sub uniprop(Int:D $code, Stringy:D $propname)
866
+ sub uniprop(Str, $propname, Stringy:D $propname)
867
+ method uniprop(|c) { uniprop(self, |c)
866
868
867
869
Interprets the invocant as a L < Str|/type/Str > , and returns the
868
870
L < unicode property|http://userguide.icu-project.org/strings/properties > of the first
869
871
character. If no property is specified returns the
870
872
L < General Category|https://en.wikipedia.org/wiki/Unicode_character_property#General_Category > .
873
+ Returns a Bool for Boolean properties.
871
874
872
875
say 'a'.uniprop; # Ll
873
876
say '1'.uniprop; # Nd
874
- say 'a'.uniprop('Alphabetic'); # 1
875
- say '1'.uniprop('Alphabetic'); # 0
877
+ say 'a'.uniprop('Alphabetic'); # True
878
+ say '1'.uniprop('Alphabetic'); # False
879
+
880
+ = head2 routine uniprops
881
+
882
+ Defined as:
883
+ sub uniprops(Str:D $str, Stringy:D $propname = "General_Category")
884
+
885
+ Interprets the invocant as a L < Str|/type/Str > , and returns the
886
+ L < unicode property|http://userguide.icu-project.org/strings/properties > for each character
887
+ as a Seq. If no property is specified returns the
888
+ L < General Category|https://en.wikipedia.org/wiki/Unicode_character_property#General_Category > .
889
+ Returns a Bool for Boolean properties. Similar to L < uniprop|/routine/uniprop >
890
+
876
891
877
892
= head2 routine uniname
878
893
0 commit comments