Sha256: 09bc1cefaff43f31922505f0053819a8cc319ca0cd1ef6977a51d67f9a05362c
Contents?: true
Size: 460 Bytes
Versions: 66
Compression:
Stored size: 460 Bytes
Contents
module Acronym exposing (abbreviate) import Regex exposing (HowMany(All), regex) import String abbreviate : String -> String abbreviate phrase = phrase |> Regex.split All (regex "[ -]") |> List.map firstLetter |> String.join "" firstLetter : String -> String firstLetter word = case String.uncons word of Just ( letter, _ ) -> String.toUpper <| String.fromChar letter Nothing -> ""
Version data entries
66 entries across 66 versions & 1 rubygems