| Copyright | Copyright (C) 2007 John Goerzen |
|---|---|
| License | BSD3 |
| Maintainer | John Lato <jwlato@gmail.com> |
| Stability | provisional |
| Portability | portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell98 |
Data.ListLike.String
Description
String-like functions
Written by John Goerzen, jgoerzen@complete.org
Documentation
class StringLike s where Source
An extension to ListLike for those data types that are similar
to a String. Minimal complete definition is toString and
fromString.
Minimal complete definition
Methods
toString :: s -> String Source
Converts the structure to a String
fromString :: String -> s Source
Converts a String to a list
lines :: ListLike full s => s -> full Source
Breaks a string into a list of strings
words :: ListLike full s => s -> full Source
Breaks a string into a list of words
unlines :: ListLike full s => full -> s Source
Joins lines
unwords :: ListLike full s => full -> s Source
Joins words
Instances
| 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 (DList Char) | |
| StringLike (FMList Char) | |
| StringLike (Vector Char) | |
| StringLike (Vector Char) | |
| StringLike (Vector Char) | |
| (Integral i, Ix i) => StringLike (Array i Char) |