utility-ht-0.0.16: Various small helper functions for Lists, Maybes, Tuples, Functions
Safe HaskellSafe-Inferred
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.