Module: stdgo.bufio
Overview
Index
-
function newReadWriter(_r:stdgo.bufio.Reader, _w:stdgo.bufio.Writer):stdgo.bufio.ReadWriter
-
function newReader(_rd:stdgo._internal.io.Reader):stdgo.bufio.Reader
-
function newReaderSize(_rd:stdgo._internal.io.Reader, _size:Int):stdgo.bufio.Reader
-
function newScanner(_r:stdgo._internal.io.Reader):stdgo.bufio.Scanner
-
function newWriter(_w:stdgo._internal.io.Writer):stdgo.bufio.Writer
-
function newWriterSize(_w:stdgo._internal.io.Writer, _size:Int):stdgo.bufio.Writer
-
function scanBytes(_data:Array<UInt>, _atEOF:Bool):stdgo.Tuple3<Int, Array<UInt>, stdgo.Error>
-
function scanLines(_data:Array<UInt>, _atEOF:Bool):stdgo.Tuple3<Int, Array<UInt>, stdgo.Error>
-
function scanRunes(_data:Array<UInt>, _atEOF:Bool):stdgo.Tuple3<Int, Array<UInt>, stdgo.Error>
-
function scanWords(_data:Array<UInt>, _atEOF:Bool):stdgo.Tuple3<Int, Array<UInt>, stdgo.Error>
Constants
import stdgo.bufio.Bufio
final defaultBufSize:haxe.UInt64 = stdgo._internal.bufio.Bufio_defaultBufSize.defaultBufSize
final maxScanTokenSize:haxe.UInt64 = stdgo._internal.bufio.Bufio_maxScanTokenSize.maxScanTokenSize
Variables
import stdgo.bufio.Bufio
var errAdvanceTooFar:stdgo.Error
var errBadReadCount:stdgo.Error
var errBufferFull:stdgo.Error
var errFinalToken:stdgo.Error
var errInvalidUnreadByte:stdgo.Error
var errInvalidUnreadRune:stdgo.Error
var errNegativeAdvance:stdgo.Error
var errNegativeCount:stdgo.Error
var errTooLong:stdgo.Error
Functions
import stdgo.bufio.Bufio
function isSpace
function isSpace()
Classes
import stdgo.bufio.*
class Bufio
Package bufio implements buffered I/O. It wraps an io.Reader or io.Writer
object, creating another object (Reader or Writer) that also implements
the interface but provides buffering and some help for textual I/O.
Bufio function newReadWriter
function newReadWriter(_r:stdgo.bufio.Reader, _w:stdgo.bufio.Writer):stdgo.bufio.ReadWriter
NewReadWriter allocates a new ReadWriter that dispatches to r and w.
Bufio function newReader
function newReader(_rd:stdgo._internal.io.Reader):stdgo.bufio.Reader
NewReader returns a new Reader whose buffer has the default size.
Bufio function newReaderSize
function newReaderSize(_rd:stdgo._internal.io.Reader, _size:Int):stdgo.bufio.Reader
NewReaderSize returns a new Reader whose buffer has at least the specified
size. If the argument io.Reader is already a Reader with large enough
size, it returns the underlying Reader.
Bufio function newScanner
function newScanner(_r:stdgo._internal.io.Reader):stdgo.bufio.Scanner
NewScanner returns a new Scanner to read from r.
The split function defaults to ScanLines.
Bufio function newWriter
function newWriter(_w:stdgo._internal.io.Writer):stdgo.bufio.Writer
NewWriter returns a new Writer whose buffer has the default size.
If the argument io.Writer is already a Writer with large enough buffer size,
it returns the underlying Writer.
Bufio function newWriterSize
function newWriterSize(_w:stdgo._internal.io.Writer, _size:Int):stdgo.bufio.Writer
NewWriterSize returns a new Writer whose buffer has at least the specified
size. If the argument io.Writer is already a Writer with large enough
size, it returns the underlying Writer.
Bufio function scanBytes
function scanBytes(_data:Array<UInt>, _atEOF:Bool):stdgo.Tuple3<Int, Array<UInt>, stdgo.Error>
ScanBytes is a split function for a Scanner that returns each byte as a token.
Bufio function scanLines
function scanLines(_data:Array<UInt>, _atEOF:Bool):stdgo.Tuple3<Int, Array<UInt>, stdgo.Error>
ScanLines is a split function for a Scanner that returns each line of
text, stripped of any trailing end-of-line marker. The returned line may
be empty. The end-of-line marker is one optional carriage return followed
by one mandatory newline. In regular expression notation, it is `\r?\n`.
The last non-empty line of input will be returned even if it has no
newline.
Bufio function scanRunes
function scanRunes(_data:Array<UInt>, _atEOF:Bool):stdgo.Tuple3<Int, Array<UInt>, stdgo.Error>
ScanRunes is a split function for a Scanner that returns each
UTF-8-encoded rune as a token. The sequence of runes returned is
equivalent to that from a range loop over the input as a string, which
means that erroneous UTF-8 encodings translate to U+FFFD = "\xef\xbf\xbd".
Because of the Scan interface, this makes it impossible for the client to
distinguish correctly encoded replacement runes from encoding errors.
Bufio function scanWords
function scanWords(_data:Array<UInt>, _atEOF:Bool):stdgo.Tuple3<Int, Array<UInt>, stdgo.Error>
ScanWords is a split function for a Scanner that returns each
space-separated word of text, with surrounding spaces deleted. It will
never return an empty string. The definition of space is set by
unicode.IsSpace.
Typedefs
import stdgo.bufio.*
typedef SplitFunc
typedef SplitFunc = stdgo._internal.bufio.SplitFunc;