Class Tokenizer
This class contains methods used to tokenize a string.
Inherited Members
Namespace: Akka.Configuration.Hocon
Assembly: Akka.dll
Syntax
public class Tokenizer
Constructors
| Improve this Doc View SourceTokenizer(String)
Initializes a new instance of the Tokenizer class.
Declaration
public Tokenizer(string text)
Parameters
Type | Name | Description |
---|---|---|
String | text | The string that contains the text to tokenize. |
Properties
| Improve this Doc View SourceEoF
A value indicating whether the tokenizer has reached the end of the string.
Declaration
public bool EoF { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
| Improve this Doc View SourceMatches(String)
Determines whether the given pattern matches the value at the current position of the tokenizer.
Declaration
public bool Matches(string pattern)
Parameters
Type | Name | Description |
---|---|---|
String | pattern | The string that contains the characters to match. |
Returns
Type | Description |
---|---|
Boolean |
|
Matches(String[])
Determines whether any of the given patterns match the value at the current position of the tokenizer.
Declaration
public bool Matches(params string[] patterns)
Parameters
Type | Name | Description |
---|---|---|
String[] | patterns | The string array that contains the characters to match. |
Returns
Type | Description |
---|---|
Boolean |
|
Peek()
Retrieves the next character in the tokenizer without advancing its position.
Declaration
public char Peek()
Returns
Type | Description |
---|---|
Char | The character at the tokenizer's current position. |
PickErrorLine(out Int32)
Declaration
protected string PickErrorLine(out int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index |
Returns
Type | Description |
---|---|
String |
Pop()
Removes an index from the tokenizer's bookkeeping stack.
Declaration
public void Pop()
PullWhitespace()
Advances the tokenizer to the next non-whitespace character.
Declaration
public void PullWhitespace()
Push()
Adds the current index to the tokenizer's bookkeeping stack.
Declaration
public void Push()
Take()
Retrieves the next character in the tokenizer.
Declaration
public char Take()
Returns
Type | Description |
---|---|
Char | The character at the tokenizer's current position. |
Take(Int32)
Retrieves a string of the given length from the current position of the tokenizer.
Declaration
public string Take(int length)
Parameters
Type | Name | Description |
---|---|---|
Int32 | length | The length of the string to return. |
Returns
Type | Description |
---|---|
String | The string of the given length. If the length exceeds where the current index is located, then null is returned. |