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 NonCopyableConstructors
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 MultiLineCommentSeparatorField Value
| SeparatorData 
 | 
Separators
Array with all token separators.
Declaration
public Array<SeparatorData> SeparatorsField Value
| Array<SeparatorData> 
 | 
SingleLineComment
Declaration
public SeparatorData SingleLineCommentField Value
| SeparatorData 
 | 
Whitespaces
Array with all white characters.
///
Declaration
public Array<char> WhitespacesField 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() constReturns
| 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() constReturns
| int32 
 | 
PeekChar()
Peeks a single character without moving forward in the buffer.
Declaration
public char PeekChar() constReturns
| 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()