Skip to content

Commit 944a264

Browse files
committed
simple case, unicode and soundex examples
1 parent ed4e187 commit 944a264

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
use v6;
2+
3+
=begin pod
4+
5+
=TITLE Using Named Unicode Chars
6+
7+
=AUTHOR stmuk
8+
9+
=end pod
10+
11+
say "\c[REGISTERED SIGN]";
12+
13+
say uniname("\x1f63E"); # POUTING CAT FACE
14+
15+
# vim: expandtab shiftwidth=4 ft=perl6
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
use v6;
2+
3+
=begin pod
4+
5+
=TITLE Upper/Lower Case
6+
7+
=AUTHOR stmuk
8+
9+
You have a string and what to upper/lower case it
10+
11+
=end pod
12+
13+
my $string = "the cat sat on the mat";
14+
15+
say $string=$string.uc; # THE CAT SAT ON THE MAT
16+
17+
say $string.=lc; # the cat sat on the mat
18+
19+
say $string.wordcase; # The Cat Sat On The Mat
20+
21+
# vim: expandtab shiftwidth=4 ft=perl6
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
use v6;
2+
3+
=begin pod
4+
5+
=TITLE Soundex Matching
6+
7+
=AUTHOR stmuk
8+
9+
You have two surnames and want to know if they sound similar
10+
11+
=end pod
12+
13+
use Algorithm::Soundex;
14+
15+
my Algorithm::Soundex $s .= new();
16+
17+
say $s.soundex("Smith");
18+
say $s.soundex("Smythe");
19+
say $s.soundex("Bloggs");
20+
21+
# vim: expandtab shiftwidth=4 ft=perl6

0 commit comments

Comments
 (0)