ghc-6.12.3: The GHC APISource codeContentsIndex
StringBuffer
Contents
Creation/destruction
Inspection
Moving and comparison
Conversion
Parsing integers
Synopsis
data StringBuffer = StringBuffer {
buf :: !(ForeignPtr Word8)
len :: !Int
cur :: !Int
}
hGetStringBuffer :: FilePath -> IO StringBuffer
hGetStringBufferBlock :: Handle -> Int -> IO StringBuffer
appendStringBuffers :: StringBuffer -> StringBuffer -> IO StringBuffer
stringToStringBuffer :: String -> IO StringBuffer
nextChar :: StringBuffer -> (Char, StringBuffer)
currentChar :: StringBuffer -> Char
prevChar :: StringBuffer -> Char -> Char
atEnd :: StringBuffer -> Bool
stepOn :: StringBuffer -> StringBuffer
offsetBytes :: Int -> StringBuffer -> StringBuffer
byteDiff :: StringBuffer -> StringBuffer -> Int
lexemeToString :: StringBuffer -> Int -> String
lexemeToFastString :: StringBuffer -> Int -> FastString
parseUnsignedInteger :: StringBuffer -> Int -> Integer -> (Char -> Int) -> Integer
Documentation
data StringBuffer Source

A StringBuffer is an internal pointer to a sized chunk of bytes. The bytes are intended to be *immutable*. There are pure operations to read the contents of a StringBuffer.

A StringBuffer may have a finalizer, depending on how it was obtained.

Constructors
StringBuffer
buf :: !(ForeignPtr Word8)
len :: !Int
cur :: !Int
show/hide Instances
Creation/destruction
hGetStringBuffer :: FilePath -> IO StringBufferSource
hGetStringBufferBlock :: Handle -> Int -> IO StringBufferSource
appendStringBuffers :: StringBuffer -> StringBuffer -> IO StringBufferSource
stringToStringBuffer :: String -> IO StringBufferSource
Inspection
nextChar :: StringBuffer -> (Char, StringBuffer)Source
currentChar :: StringBuffer -> CharSource
prevChar :: StringBuffer -> Char -> CharSource
atEnd :: StringBuffer -> BoolSource
Moving and comparison
stepOn :: StringBuffer -> StringBufferSource
offsetBytes :: Int -> StringBuffer -> StringBufferSource
byteDiff :: StringBuffer -> StringBuffer -> IntSource
Conversion
lexemeToString :: StringBuffer -> Int -> StringSource
lexemeToFastString :: StringBuffer -> Int -> FastStringSource
Parsing integers
parseUnsignedInteger :: StringBuffer -> Int -> Integer -> (Char -> Int) -> IntegerSource
XXX assumes ASCII digits only (by using byteOff)
Produced by Haddock version 2.6.1