Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fkm_nbt/utils/StringReader.ts>StringReader

Node: https://www.npmjs.com/package/fkm-nbt Deno: https://deno.land/x/fkm_nbt
Latest
class StringReader
import { StringReader } from "https://deno.land/x/fkm_nbt@v0.1.0/utils/StringReader.ts";

Constructors

new
StringReader(other: StringReader)
new
StringReader(string: string)
new
StringReader(string: string | StringReader)

Properties

private
cursor: number
private
readonly
string: string

Methods

canRead(length?: number): boolean
expect(c: string): void
getCursor(): number
getRead(): string
getRemaining(): string
getString(): string
getTotalLength(): number
peek(offset?: number): string
read(): string
readBoolean(): boolean
readDouble(): number
readFloat(): number
readInt(): number
readLong(): bigint
readString(): string
readStringUntil(terminator: string): string
setCursor(cursor: number): void
skip(): void

Static Properties

private
readonly
SYNTAX_DOUBLE_QUOTE: string
private
readonly
SYNTAX_ESCAPE: string
private
readonly
SYNTAX_SINGLE_QUOTE: string
private
readonly
whitespaceCharacters: string[]

Static Methods

isAllowedInUnquotedString(c: string): boolean
isAllowedNumber(c: string): boolean
isQuotedStringStart(c: string): boolean
isWhitespace(c: string): boolean