Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class UnescapedCharSequence

    J2N.Text.ICharSequence with escaped chars information.

    Inheritance
    object
    UnescapedCharSequence
    Implements
    ICharSequence
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Lucene.Net.QueryParsers.Flexible.Core.Util
    Assembly: Lucene.Net.QueryParser.dll
    Syntax
    public sealed class UnescapedCharSequence : ICharSequence

    Constructors

    UnescapedCharSequence(ICharSequence)

    Create a non-escaped J2N.Text.ICharSequence

    Declaration
    public UnescapedCharSequence(ICharSequence text)
    Parameters
    Type Name Description
    ICharSequence text

    UnescapedCharSequence(char[], bool[], int, int)

    Create a escaped J2N.Text.ICharSequence

    Declaration
    public UnescapedCharSequence(char[] chars, bool[] wasEscaped, int offset, int length)
    Parameters
    Type Name Description
    char[] chars
    bool[] wasEscaped
    int offset
    int length

    UnescapedCharSequence(string)

    Create a non-escaped string

    Declaration
    public UnescapedCharSequence(string text)
    Parameters
    Type Name Description
    string text

    UnescapedCharSequence(StringBuilder)

    Create a non-escaped StringBuilder

    Declaration
    public UnescapedCharSequence(StringBuilder text)
    Parameters
    Type Name Description
    StringBuilder text

    Properties

    this[int]

    Gets the character at the specified index, with the first character having index zero.

    Declaration
    public char this[int index] { get; }
    Parameters
    Type Name Description
    int index

    The index of the character to return.

    Property Value
    Type Description
    char

    The requested character.

    Exceptions
    Type Condition
    IndexOutOfRangeException

    If index < 0 or index is greater than the length of this sequence.

    InvalidOperationException

    If the underlying value of this sequence is null.

    Length

    Gets the number of characters in this sequence.

    Declaration
    public int Length { get; }
    Property Value
    Type Description
    int

    Methods

    Subsequence(int, int)

    Retrieves a sub-sequence from this instance. The sub-sequence starts at a specified character position and has a specified length.

    IMPORTANT: This method has .NET semantics, that is, the second parameter is a length, not an exclusive end index as it would be in Java. To translate from Java to .NET, callers must account for this by subtracting (end - start) for the length.
    Declaration
    public ICharSequence Subsequence(int startIndex, int length)
    Parameters
    Type Name Description
    int startIndex

    The start index of the sub-sequence. It is inclusive, that is, the index of the first character that is included in the sub-sequence.

    int length

    The number of characters to return in the sub-sequence.

    Returns
    Type Description
    ICharSequence
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    startIndex plus length indicates a position not within this instance.

    -or-

    startIndex or length is less than zero.

    ToLower(ICharSequence, CultureInfo)

    J2N.Text.ICharSequence with escaped chars information.

    Declaration
    public static ICharSequence ToLower(ICharSequence text, CultureInfo locale)
    Parameters
    Type Name Description
    ICharSequence text
    CultureInfo locale
    Returns
    Type Description
    ICharSequence

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current object.

    Overrides
    object.ToString()

    ToStringEscaped()

    Return an escaped string

    Declaration
    public string ToStringEscaped()
    Returns
    Type Description
    string

    an escaped string

    ToStringEscaped(char[])

    Return an escaped string

    Declaration
    public ICharSequence ToStringEscaped(char[] enabledChars)
    Parameters
    Type Name Description
    char[] enabledChars

    array of chars to be escaped

    Returns
    Type Description
    ICharSequence

    an escaped string

    WasEscaped(ICharSequence, int)

    J2N.Text.ICharSequence with escaped chars information.

    Declaration
    public static bool WasEscaped(ICharSequence text, int index)
    Parameters
    Type Name Description
    ICharSequence text
    int index
    Returns
    Type Description
    bool

    WasEscaped(int)

    J2N.Text.ICharSequence with escaped chars information.

    Declaration
    public bool WasEscaped(int index)
    Parameters
    Type Name Description
    int index
    Returns
    Type Description
    bool

    Implements

    J2N.Text.ICharSequence
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.