ListLike-4.6.3: Generalized support for list-like structures

CopyrightCopyright (C) 2007 John Goerzen
LicenseBSD3
MaintainerJohn Lato <jwlato@gmail.com>
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Data.ListLike.String

Description

String-like functions

Written by John Goerzen, jgoerzen@complete.org

Synopsis

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

toString, fromString

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 Source # 
Instance details

Defined in Data.ListLike.Instances

StringLike Builder Source # 
Instance details

Defined in Data.ListLike.Text.Builder

StringLike Text Source # 
Instance details

Defined in Data.ListLike.Text.TextLazy

Methods

toString :: Text -> String Source #

fromString :: String -> Text Source #

lines :: ListLike full Text => Text -> full Source #

words :: ListLike full Text => Text -> full Source #

unlines :: ListLike full Text => full -> Text Source #

unwords :: ListLike full Text => full -> Text Source #

StringLike Text Source # 
Instance details

Defined in Data.ListLike.Text.Text

Methods

toString :: Text -> String Source #

fromString :: String -> Text Source #

lines :: ListLike full Text => Text -> full Source #

words :: ListLike full Text => Text -> full Source #

unlines :: ListLike full Text => full -> Text Source #

unwords :: ListLike full Text => full -> Text Source #

StringLike CharStringLazy Source # 
Instance details

Defined in Data.ListLike.CharString

StringLike CharString Source # 
Instance details

Defined in Data.ListLike.CharString

StringLike Chars Source # 
Instance details

Defined in Data.ListLike.Chars

Methods

toString :: Chars -> String Source #

fromString :: String -> Chars Source #

lines :: ListLike full Chars => Chars -> full Source #

words :: ListLike full Chars => Chars -> full Source #

unlines :: ListLike full Chars => full -> Chars Source #

unwords :: ListLike full Chars => full -> Chars Source #

(Eq (v Char), Vector v Char) => StringLike (v Char) Source # 
Instance details

Defined in Data.ListLike.Vector.Generic

Methods

toString :: v Char -> String Source #

fromString :: String -> v Char Source #

lines :: ListLike full (v Char) => v Char -> full Source #

words :: ListLike full (v Char) => v Char -> full Source #

unlines :: ListLike full (v Char) => full -> v Char Source #

unwords :: ListLike full (v Char) => full -> v Char Source #

StringLike (Seq Char) Source # 
Instance details

Defined in Data.ListLike.Instances

Methods

toString :: Seq Char -> String Source #

fromString :: String -> Seq Char Source #

lines :: ListLike full (Seq Char) => Seq Char -> full Source #

words :: ListLike full (Seq Char) => Seq Char -> full Source #

unlines :: ListLike full (Seq Char) => full -> Seq Char Source #

unwords :: ListLike full (Seq Char) => full -> Seq Char Source #

StringLike (DList Char) Source # 
Instance details

Defined in Data.ListLike.DList

StringLike (FMList Char) Source # 
Instance details

Defined in Data.ListLike.FMList

StringLike (UTF8 ByteString) Source # 
Instance details

Defined in Data.ListLike.UTF8

StringLike (UTF8 ByteString) Source # 
Instance details

Defined in Data.ListLike.UTF8

StringLike (Vector Char) Source # 
Instance details

Defined in Data.ListLike.Vector.Unboxed

StringLike (Vector Char) Source # 
Instance details

Defined in Data.ListLike.Vector.Storable

StringLike (Vector Char) Source # 
Instance details

Defined in Data.ListLike.Vector.Vector

(Integral i, Ix i) => StringLike (Array i Char) Source # 
Instance details

Defined in Data.ListLike.Instances

Methods

toString :: Array i Char -> String Source #

fromString :: String -> Array i Char Source #

lines :: ListLike full (Array i Char) => Array i Char -> full Source #

words :: ListLike full (Array i Char) => Array i Char -> full Source #

unlines :: ListLike full (Array i Char) => full -> Array i Char Source #

unwords :: ListLike full (Array i Char) => full -> Array i Char Source #