Class TextProcessing
Helper class to fast ANSI text processing (tokenization, reading, streaming etc.).
Inheritance
TextProcessing
Assembly: FlaxEngine.dll
File: Engine/Utilities/TextProcessing.h
Syntax
public class TextProcessing : public NonCopyable
Constructors
TextProcessing(const char* input, int32 length)
Init
Declaration
public TextProcessing(const char* input, int32 length)
Parameters
char
input
Input ANSI text buffer to process |
int32
length
Input data length |
Fields
MultiLineCommentSeparator
Declaration
public SeparatorData MultiLineCommentSeparator
Field Value
SeparatorData
|
Separators
Array with all token separators.
Declaration
public Array<SeparatorData> Separators
Field Value
Array<SeparatorData>
|
SingleLineComment
Declaration
public SeparatorData SingleLineComment
Field Value
SeparatorData
|
Whitespaces
Array with all white characters.
///
Declaration
public Array<char> Whitespaces
Field Value
Array<char>
|
Methods
CanRead()
Returns true if there are still characters in the buffer and can read data from it
Declaration
public bool CanRead() const
Returns
bool
|
EatWhiteSpaces()
Read all whitespace chars like spaces, tabs, new lines
Declaration
public void EatWhiteSpaces()
GetLine()
Gets the current line number.
Declaration
public int32 GetLine() const
Returns
int32
|
PeekChar()
Peeks a single character without moving forward in the buffer.
Declaration
public char PeekChar() const
Returns
char
|
ReadChar()
Read single character from the buffer
Declaration
public char ReadChar()
Returns
char
Character |
ReadLine()
Read whole line until new line char '
'
Declaration
public void ReadLine()
ReadLine(Token* token)
Read whole line until new line char '
'
Declaration
public void ReadLine(Token* token)
Parameters
Token
token
Read token |
ReadToken(Token* token)
Reads next token
Declaration
public void ReadToken(Token* token)
Parameters
Token
token
Output token |
Setup_HLSL()
Sets up separators and white chars for HLSL language.
Declaration
public void Setup_HLSL()