String -http +base

type String = [Char]
base Prelude, base Data.String
A String is a list of characters. String constants in Haskell are values of type String.
module Data.String
base Data.String
The String type and associated operations.
module Foreign.C.String
base Foreign.C.String
Utilities for primitive marshalling of C strings. The marshalling converts each Haskell character, representing a Unicode code point, to one or more bytes in a manner that, by default, is determined by the current locale. As a consequence, no guarantees can be made about the relative length of a Haskell string and its corresponding C string, and therefore all the marshalling routines include memory allocation. The translation between Unicode and the encoding of the current locale may be lossy.
String :: String -> Lexeme
base Text.Read.Lex, base Text.Read
String literal, with escapes interpreted
string :: String -> ReadP String
base Text.ParserCombinators.ReadP
Parses and returns the specified string.
showString :: String -> ShowS
base Prelude, base Text.Show
utility function converting a String to a show function that simply prepends the string unchanged.
type CString = Ptr CChar
base Foreign.C.String
A C string is a reference to an array of C characters terminated by NUL.
type CStringLen = (Ptr CChar, Int)
base Foreign.C.String
A string with explicit length information in bytes instead of a terminating NUL (allowing NUL characters in the middle of the string).
type CWString = Ptr CWchar
base Foreign.C.String
A C wide string is a reference to an array of C wide characters terminated by NUL.
type CWStringLen = (Ptr CWchar, Int)
base Foreign.C.String
A wide character string with explicit length information in CWchars instead of a terminating NUL (allowing NUL characters in the middle of the string).
fromString :: IsString a => String -> a
base Data.String, base GHC.Exts
hashString :: String -> Int32
base Data.HashTable
A sample hash function for Strings. We keep multiplying by the golden ratio and adding. The implementation is: > hashString = foldl' f golden > > magic = 0xdeadbeef Where hashInt32 works just as hashInt shown above. Knuth argues that repeated multiplication by the golden ratio will minimize gaps in the hash space, and thus it's a good choice for combining together multiple keys to form one. Here we know that individual characters c are often small, and this produces frequent collisions if we use ord c alone. A particular problem are the shorter low ASCII and ISO-8859-1 character strings. We pre-multiply by a magic twiddle factor to obtain a good distribution. In fact, given the following test: > testp :: Int32 -> Int > testp k = (n - ) . length . group . sort . map hs . take n $ ls > > hs = foldl' f golden > f m c = fromIntegral (ord c) * k + hashInt32 m > n = 100000 We discover that testp magic = 0.
ioeGetErrorString :: IOError -> String
base System.IO.Error
ioeSetErrorString :: IOError -> String -> IOError
base System.IO.Error
class IsString a
base Data.String, base GHC.Exts
Class for string-like datastructures; used by the overloaded string extension (-foverloaded-strings in GHC).
mkStringConstr :: DataType -> String -> Constr
base Data.Data
This function is now deprecated. Please use mkCharConstr instead.
mkStringType :: String -> DataType
base Data.Data
This function is now deprecated. Please use mkCharType instead.
newCAString :: String -> IO CString
base Foreign.C.String
Marshal a Haskell string into a NUL terminated C string. * the Haskell string may not contain any NUL characters * new storage is allocated for the C string and must be explicitly freed using Foreign.Marshal.Alloc.free or Foreign.Marshal.Alloc.finalizerFree.
newCAStringLen :: String -> IO CStringLen
base Foreign.C.String
Marshal a Haskell string into a C string (ie, character array) with explicit length information. * new storage is allocated for the C string and must be explicitly freed using Foreign.Marshal.Alloc.free or Foreign.Marshal.Alloc.finalizerFree.
newCString :: String -> IO CString
base Foreign.C.String
Marshal a Haskell string into a NUL terminated C string. * the Haskell string may not contain any NUL characters * new storage is allocated for the C string and must be explicitly freed using Foreign.Marshal.Alloc.free or Foreign.Marshal.Alloc.finalizerFree.

Show more results