diff options
-rw-r--r-- | raku/acronym/Acronym.rakumod | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/raku/acronym/Acronym.rakumod b/raku/acronym/Acronym.rakumod index 401d867..225ae9c 100644 --- a/raku/acronym/Acronym.rakumod +++ b/raku/acronym/Acronym.rakumod @@ -1,5 +1,7 @@ unit module Acronym; sub abbreviate(Str $phrase --> Str) is export { - $phrase.split((' ', '-'), :skip-empty).map(*.comb(/<[a..zA..Z]>/).first).join.uc + [~] $phrase.uc.split((' ', '-'), :skip-empty).map( + *.comb(/<[A..Z]>/).first + ) } |