Skip to content

Utils.IStringParserQuick

robbyxp1 edited this page Feb 3, 2022 · 8 revisions

IStringParserQuick Interface

Interface for parsers for QuickJSON

public interface IStringParserQuick

Derived
StringParserQuick
StringParserQuickTextReader


Properties


IStringParserQuick.Line Property

Text of line in whole

string Line { get; }
Property Value

System.String


IStringParserQuick.Position Property

Current parse position

int Position { get; }
Property Value

System.Int32


Methods


IStringParserQuick.BackUp() Method

Backup one position

void BackUp();


IStringParserQuick.GetChar() Method

Get next character. Space if at EOL.

char GetChar();
Returns

System.Char


IStringParserQuick.IsCharMoveOn(char, bool) Method

Is this character at the current position, if so, skip it. Optionally skip space afterwards

bool IsCharMoveOn(char t, bool skipspace=true);
Parameters

t System.Char

skipspace System.Boolean

Returns

System.Boolean


IStringParserQuick.IsEOL() Method

Is at End of Line

bool IsEOL();
Returns

System.Boolean


IStringParserQuick.IsStringMoveOn(string) Method

Is this string at the current position, if so, skip it and skip space

bool IsStringMoveOn(string s);
Parameters

s System.String

Returns

System.Boolean


IStringParserQuick.JNextNumber(bool) Method

Read next number: long, ulong, bigint or double.

QuickJSON.JToken JNextNumber(bool sign);
Parameters

sign System.Boolean
True if negative. Sign has been removed

Returns

JToken
New JToken of number, Long, BigInt or Double. Null if failed


IStringParserQuick.NextQuotedString(char, char[], bool) Method

Get the next quoted string into buffer. Quote has already been removed.

int NextQuotedString(char quote, char[] buffer, bool replaceescape=false);
Parameters

quote System.Char
Quote character to stop on

buffer System.Char[]
Buffer to place string into

replaceescape System.Boolean
True to replace escape sequences \, /, \b, \f, \n, \r, \t, uNNNN

Returns

System.Int32
Number of characters in buffer


IStringParserQuick.PeekChar() Method

Peek next character. Space if at EOL.

char PeekChar();
Returns

System.Char


IStringParserQuick.SkipSpace() Method

Skip all white space

void SkipSpace();
Clone this wiki locally