2024-12-09 19:53:09 -06:00
|
|
|
module Config.Helpers.Converters exposing (..)
|
|
|
|
|
|
|
|
|
|
|
|
formatName : String -> String
|
|
|
|
formatName name =
|
|
|
|
name
|
|
|
|
|> String.toLower
|
|
|
|
|> String.replace " " ""
|
|
|
|
|> String.replace "'" ""
|
|
|
|
|> String.replace "." ""
|
|
|
|
|> String.replace "-" ""
|
|
|
|
|> String.replace "_" ""
|
|
|
|
|
|
|
|
|
|
|
|
formatSocial : String -> String
|
|
|
|
formatSocial name =
|
|
|
|
name
|
|
|
|
|> String.replace "https://x.com/" "@"
|
|
|
|
|> String.replace "https://www.threads.net/@" "@"
|
|
|
|
|> String.replace "https://bsky.app/profile/" "@"
|
|
|
|
|> String.replace "https://www.instagram.com/" "@"
|
2024-12-16 04:19:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
wordCount : String -> Int
|
|
|
|
wordCount text =
|
|
|
|
text
|
|
|
|
|> String.words
|
|
|
|
|> List.length
|