-
Notifications
You must be signed in to change notification settings - Fork 0
Utils.IStringParserQuick
Interface for parsers for QuickJSON
public interface IStringParserQuick
Derived
↳ StringParserQuick
↳ StringParserQuickTextReader
Text of line in whole
string Line { get; }
Current parse position
int Position { get; }
Backup one position
void BackUp();
Calculate a checksum on the next char block.
uint ChecksumCharBlock(System.Func<char,bool> test, bool skipafter=true);
test
System.Func<System.Char,System.Boolean>
Test character, if true, accept it and continue
skipafter
System.Boolean
True to skip spaces after the block ends
System.UInt32
Checksum, 0 if no chars
Get next character or char.MinValue if at EOL.
char GetChar();
Skip spaces, then get next character or char.MinValue if at EOL. Optionally skip afterwards
char GetNextNonSpaceChar(bool skipspacesafter=true);
skipspacesafter
System.Boolean
Is this character at the current position, if so, skip it. Optionally skip space afterwards
bool IsCharMoveOn(char t, bool skipspaceafter=true);
skipspaceafter
System.Boolean
Is at End of Line
bool IsEOL();
Is this string at the current position, if so, skip it and skip space
bool IsStringMoveOn(string s);
Read next number: long, ulong, bigint or double.
QuickJSON.JToken JNextNumber(bool sign, bool skipafter=true);
sign
System.Boolean
True if negative. Sign has been removed
skipafter
System.Boolean
True to skip spaces after the string ends
JToken
New JToken of number, Long, BigInt or Double. Null if failed
Read next token value from string then skip on
QuickJSON.JToken JNextValue(char[] buffer, bool inarray);
buffer
System.Char[]
Buffer to place string into
inarray
System.Boolean
True if in a json array
JToken
New JToken of string, Long, ULong, BigInt or Double, Bool. Null if failed
Read a character block.
int NextCharBlock(char[] buffer, System.Func<char,bool> test, bool skipafter=true);
buffer
System.Char[]
Buffer to place string into
test
System.Func<System.Char,System.Boolean>
Test function, if true, accept it, else stop here (without removing it)
skipafter
System.Boolean
True to skip spaces after the block ends
System.Int32
Number of characters in buffer. -1 if it runs out of buffer space
Get the next quoted string into buffer. Quote has already been removed.
int NextQuotedString(char quote, char[] buffer, bool replaceescape=false, bool skipafter=true);
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
skipafter
System.Boolean
True to skip spaces after the string ends
System.Int32
Number of characters in buffer. -1 if it runs out of store buffer space or reached end of data
Peek next character or char.MinValue if at EOL.
char PeekChar();
Skip all white space
void SkipSpace();