utility-ht-0.0.12: Various small helper functions for Lists, Maybes, Tuples, Functions

Safe HaskellSafe
LanguageHaskell98

Data.String.HT

Synopsis

Documentation

trim :: String -> String Source #

Remove leading and trailing spaces.

We use spine strict dropWhile instead of the element strict version. This is more efficient for finite Strings because isSpace is expensive. The downside is that trim does not work for infinite Strings.