Portability | portable |
---|---|
Stability | provisional |
Maintainer | John Lato <jwlato@gmail.com> |
Safe Haskell | Safe-Inferred |
String-like functions
Written by John Goerzen, jgoerzen@complete.org
Documentation
class StringLike s whereSource
An extension to ListLike
for those data types that are similar
to a String
. Minimal complete definition is toString
and
fromString
.
Converts the structure to a String
fromString :: String -> sSource
Converts a String
to a list
lines :: ListLike full s => s -> fullSource
Breaks a string into a list of strings
words :: ListLike full s => s -> fullSource
Breaks a string into a list of words
unlines :: ListLike full s => full -> sSource
Joins lines
unwords :: ListLike full s => full -> sSource
Joins words
StringLike String | |
StringLike ByteString | |
StringLike ByteString | |
StringLike Text | |
StringLike Text | |
StringLike CharStringLazy | |
StringLike CharString | |
(Eq (v Char), Vector v Char) => StringLike (v Char) | |
StringLike (Seq Char) | |
StringLike (Vector Char) | |
StringLike (Vector Char) | |
StringLike (Vector Char) | |
(Integral i, Ix i) => StringLike (Array i Char) |