Useful-0.0.6: 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 " \v\r  asdsadasds   \r\n"
 "asdsadasds"	

stripr :: String -> StringSource

Strips whitespace from the right of a string

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

stripl :: String -> StringSource

Strips whitespace from the left of a string

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

whiteSpaceChars :: [Char]Source

List of whitespace characters:

 $whiteSpaceChars
 [' ','\r','\n','\t','\f','\v']