inputstream

package
v0.0.0-...-60c6745 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Eof rune = -1
View Source
const Unset rune = -2

Variables

This section is empty.

Functions

func IsAsciiAlpha

func IsAsciiAlpha(char rune) bool

Returns true if the current rune is an ASCII letter.

func IsAsciiAlphaNumeric

func IsAsciiAlphaNumeric(char rune) bool

Returns true if the current rune is an ASCII digit or letter.

func IsAsciiHexDigit

func IsAsciiHexDigit(char rune) bool

Returns true if the current rune is an hex digit

func IsAsciiLower

func IsAsciiLower(char rune) bool

Returns true if the current rune is an ASCII lowercase letter.

func IsAsciiNumeric

func IsAsciiNumeric(char rune) bool

Returns true if the current rune is an ASCII digit.

func IsAsciiUpper

func IsAsciiUpper(char rune) bool

Returns true if the current rune is an ASCII uppercase letter.

func IsOneOf

func IsOneOf(set string, char rune) bool

Returns true if the current rune is one of the given codepoints.

Types

type InputStream

type InputStream struct {
	Pos int
	// contains filtered or unexported fields
}

func New

func New(input string) InputStream

func (*InputStream) Consume

func (i *InputStream) Consume() rune

func (*InputStream) ConsumeMatch

func (i *InputStream) ConsumeMatch(expected string) bool

Consumes as many bytes as there are in the expected string if the next few codepoints match it case-sensitively.

func (*InputStream) ConsumeMatchIgnoreCase

func (i *InputStream) ConsumeMatchIgnoreCase(expected string) bool

Consumes as many bytes as there are in the expected string if the next few codepoints match it case-insensitively.

func (*InputStream) LookAhead

func (i *InputStream) LookAhead(n uint) string

func (*InputStream) Peek

func (i *InputStream) Peek() rune

func (*InputStream) Reconsume

func (i *InputStream) Reconsume()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL