Useful-0.0.3: Some useful functions and shorthands.

Useful.String

Description

String operations, part of the Useful module.

Synopsis

Documentation

strip :: String -> StringSource

Strips whitespace from either side of a string.

 $ strip "   asdsadasds   \r\n" \n
 "asdsadasds"	

stripr :: String -> StringSource

Strips whitespace from the right of a string

 $ stripr "  asdioamlksd   \n\n" \n
 "  asdioamlksd"

stripl :: String -> StringSource

Strips whitespace from the left of a string

 $ stripl " \n\n  askdjnasdnaskd"
 "askdjnasdnaskd"

stripset :: [Char]Source

List of whitespace characters:

 [' ','\r','\n','\t']