Lines Matching full:scanner
14 // Scanner provides a convenient interface for reading data such as
30 type Scanner struct {
49 // Scanner to read more data into the slice and try again with a longer slice
60 // Errors returned by Scanner.
62 ErrTooLong = errors.New("bufio.Scanner: token too long")
63 ErrNegativeAdvance = errors.New("bufio.Scanner: SplitFunc returns negative advance count")
64 ErrAdvanceTooFar = errors.New("bufio.Scanner: SplitFunc returns advance count beyond input")
74 // NewScanner returns a new Scanner to read from r.
76 func NewScanner(r io.Reader) *Scanner {
77 return &Scanner{
85 // Err returns the first non-EOF error that was encountered by the Scanner.
86 func (s *Scanner) Err() error {
96 func (s *Scanner) Bytes() []byte {
102 func (s *Scanner) Text() string {
106 // Scan advances the Scanner to the next token, which will then be
114 func (s *Scanner) Scan() bool {
178 // be extra careful: Scanner is for safe, simple jobs.
200 func (s *Scanner) advance(n int) bool {
214 func (s *Scanner) setErr(err error) {
220 // Split sets the split function for the Scanner. If called, it must be
222 func (s *Scanner) Split(split SplitFunc) {
228 // ScanBytes is a split function for a Scanner that returns each byte as a token.
238 // ScanRunes is a split function for a Scanner that returns each
284 // ScanLines is a split function for a Scanner that returns each line of
331 // ScanWords is a split function for a Scanner that returns each