summary refs log tree commit diff stats
path: root/raku/acronym/Acronym.rakumod
blob: 401d867249b29dd452a86b538138d9c02afc9876 (plain) (blame)
1
2
3
4
5
unit module Acronym;

sub abbreviate(Str $phrase --> Str) is export {
    $phrase.split((' ', '-'), :skip-empty).map(*.comb(/<[a..zA..Z]>/).first).join.uc
}