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

sub abbreviate(Str $phrase --> Str) is export {
    [~] $phrase.split(/<[-_\s]>/).map(*.substr(0, 1).uc)
}