Data.String
Copyright | (c) The University of Glasgow 2007 |
---|---|
License | BSD-style (see the file libraries/base/LICENSE) |
Maintainer | [email protected] |
Stability | experimental |
Portability | portable |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
Contents
Description
The String
type and associated operations.
A String
is a list of characters. String constants in Haskell are values of type String
.
Class for string-like datastructures; used by the overloaded string extension (-XOverloadedStrings in GHC).
Methods
fromString :: String -> a Source
Functions on strings
lines :: String -> [String] Source
lines
breaks a string up into a list of strings at newline characters. The resulting strings do not contain newlines.
words :: String -> [String] Source
words
breaks a string up into a list of words, which were delimited by white space.
unlines :: [String] -> String Source
unlines
is an inverse operation to lines
. It joins lines, after appending a terminating newline to each.
unwords :: [String] -> String Source
unwords
is an inverse operation to words
. It joins words with separating spaces.
© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/7.10.3/docs/html/libraries/base-4.8.2.0/Data-String.html