Search Results for

    Show / Hide Table of Contents

    Class Tokenizer

    This class contains methods used to tokenize a string.

    Inheritance
    object
    Tokenizer
    HoconTokenizer
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Configuration.Hocon
    Assembly: Akka.dll
    Syntax
    public class Tokenizer

    Constructors

    | Edit this page View Source

    Tokenizer(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

    | Edit this page View Source

    EoF

    A value indicating whether the tokenizer has reached the end of the string.

    Declaration
    public bool EoF { get; }
    Property Value
    Type Description
    bool

    Methods

    | Edit this page View Source

    Matches(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
    bool

    true if the pattern matches, otherwise false.

    | Edit this page View Source

    Matches(params 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
    bool

    true if any one of the patterns match, otherwise false.

    | Edit this page View Source

    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.

    | Edit this page View Source

    PickErrorLine(out int)

    Declaration
    protected string PickErrorLine(out int index)
    Parameters
    Type Name Description
    int index
    Returns
    Type Description
    string
    | Edit this page View Source

    Pop()

    Removes an index from the tokenizer's bookkeeping stack.

    Declaration
    public void Pop()
    | Edit this page View Source

    PullWhitespace()

    Advances the tokenizer to the next non-whitespace character.

    Declaration
    public void PullWhitespace()
    | Edit this page View Source

    Push()

    Adds the current index to the tokenizer's bookkeeping stack.

    Declaration
    public void Push()
    | Edit this page View Source

    Take()

    Retrieves the next character in the tokenizer.

    Declaration
    public char Take()
    Returns
    Type Description
    char

    The character at the tokenizer's current position.

    | Edit this page View Source

    Take(int)

    Retrieves a string of the given length from the current position of the tokenizer.

    Declaration
    public string Take(int length)
    Parameters
    Type Name Description
    int 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.

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET