A music player that connects to your cloud/distributed storage. diffuse.sh
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647module String.Ext exposing (..)
{-| Flipped version of `append`.-}
-- 🔱
{-| Flipped version of `append`.-}addSuffix : String -> String -> StringaddSuffix a b = String.append b a
{-| Chop something from the end of a string until it's not there anymore.-}chopEnd : String -> String -> StringchopEnd needle str = if String.endsWith needle str then str |> String.dropRight (String.length needle) |> chopEnd needle
else str
{-| Chop something from the beginning of a string until it's not there anymore.-}chopStart : String -> String -> StringchopStart needle str = if String.startsWith needle str then str |> String.dropLeft (String.length needle) |> chopStart needle
else str
{-| Join a list of Strings with a space in between.-}joinWithSpace : List String -> StringjoinWithSpace = String.join " "