Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class OpenStringBuilder

    A StringBuilder that allows one to access the array.

    Inheritance
    object
    OpenStringBuilder
    Implements
    ISpanAppendable
    IAppendable
    ICharSequence
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Lucene.Net.Analysis.Util
    Assembly: Lucene.Net.Analysis.Common.dll
    Syntax
    public class OpenStringBuilder : ISpanAppendable, IAppendable, ICharSequence

    Constructors

    OpenStringBuilder()

    A StringBuilder that allows one to access the array.

    Declaration
    public OpenStringBuilder()

    OpenStringBuilder(char[], int)

    A StringBuilder that allows one to access the array.

    Declaration
    public OpenStringBuilder(char[] arr, int len)
    Parameters
    Type Name Description
    char[] arr
    int len

    OpenStringBuilder(int)

    A StringBuilder that allows one to access the array.

    Declaration
    public OpenStringBuilder(int size)
    Parameters
    Type Name Description
    int size

    Fields

    m_buf

    A StringBuilder that allows one to access the array.

    Declaration
    protected char[] m_buf
    Field Value
    Type Description
    char[]

    m_len

    A StringBuilder that allows one to access the array.

    Declaration
    protected int m_len
    Field Value
    Type Description
    int

    Properties

    Array

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual char[] Array { get; }
    Property Value
    Type Description
    char[]

    Capacity

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual int Capacity { get; }
    Property Value
    Type Description
    int

    this[int]

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

    Declaration
    public virtual char this[int index] { get; set; }
    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 virtual int Length { get; set; }
    Property Value
    Type Description
    int

    Methods

    Append(ICharSequence)

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual OpenStringBuilder Append(ICharSequence csq)
    Parameters
    Type Name Description
    ICharSequence csq
    Returns
    Type Description
    OpenStringBuilder

    Append(ICharSequence, int, int)

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual OpenStringBuilder Append(ICharSequence csq, int startIndex, int count)
    Parameters
    Type Name Description
    ICharSequence csq
    int startIndex
    int count
    Returns
    Type Description
    OpenStringBuilder

    Append(char)

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual OpenStringBuilder Append(char c)
    Parameters
    Type Name Description
    char c
    Returns
    Type Description
    OpenStringBuilder

    Append(char[])

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual OpenStringBuilder Append(char[] value)
    Parameters
    Type Name Description
    char[] value
    Returns
    Type Description
    OpenStringBuilder

    Append(char[], int, int)

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual OpenStringBuilder Append(char[] value, int startIndex, int count)
    Parameters
    Type Name Description
    char[] value
    int startIndex
    int count
    Returns
    Type Description
    OpenStringBuilder

    Append(ReadOnlySpan<char>)

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual OpenStringBuilder Append(ReadOnlySpan<char> value)
    Parameters
    Type Name Description
    ReadOnlySpan<char> value
    Returns
    Type Description
    OpenStringBuilder

    Append(string)

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual OpenStringBuilder Append(string csq)
    Parameters
    Type Name Description
    string csq
    Returns
    Type Description
    OpenStringBuilder

    Append(string, int, int)

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual OpenStringBuilder Append(string csq, int startIndex, int count)
    Parameters
    Type Name Description
    string csq
    int startIndex
    int count
    Returns
    Type Description
    OpenStringBuilder

    Append(StringBuilder)

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual OpenStringBuilder Append(StringBuilder csq)
    Parameters
    Type Name Description
    StringBuilder csq
    Returns
    Type Description
    OpenStringBuilder

    Append(StringBuilder, int, int)

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual OpenStringBuilder Append(StringBuilder csq, int startIndex, int count)
    Parameters
    Type Name Description
    StringBuilder csq
    int startIndex
    int count
    Returns
    Type Description
    OpenStringBuilder

    EnsureCapacity(int)

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual void EnsureCapacity(int capacity)
    Parameters
    Type Name Description
    int capacity

    Remove(int, int)

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual OpenStringBuilder Remove(int startIndex, int length)
    Parameters
    Type Name Description
    int startIndex
    int length
    Returns
    Type Description
    OpenStringBuilder

    Reset()

    A StringBuilder that allows one to access the array.

    Declaration
    public void Reset()

    Resize(int)

    A StringBuilder that allows one to access the array.

    Declaration
    protected virtual void Resize(int len)
    Parameters
    Type Name Description
    int len

    Set(char[], int)

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual void Set(char[] arr, int end)
    Parameters
    Type Name Description
    char[] arr
    int end

    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 virtual 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.

    ToCharArray()

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual char[] ToCharArray()
    Returns
    Type Description
    char[]

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

    UnsafeWrite(ICharSequence, int, int)

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual void UnsafeWrite(ICharSequence b, int off, int len)
    Parameters
    Type Name Description
    ICharSequence b
    int off
    int len

    UnsafeWrite(char)

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual void UnsafeWrite(char b)
    Parameters
    Type Name Description
    char b

    UnsafeWrite(char[], int, int)

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual void UnsafeWrite(char[] b, int off, int len)
    Parameters
    Type Name Description
    char[] b
    int off
    int len

    UnsafeWrite(int)

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual void UnsafeWrite(int b)
    Parameters
    Type Name Description
    int b

    UnsafeWrite(ReadOnlySpan<char>)

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual void UnsafeWrite(ReadOnlySpan<char> b)
    Parameters
    Type Name Description
    ReadOnlySpan<char> b

    UnsafeWrite(string, int, int)

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual void UnsafeWrite(string b, int off, int len)
    Parameters
    Type Name Description
    string b
    int off
    int len

    UnsafeWrite(StringBuilder, int, int)

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual void UnsafeWrite(StringBuilder b, int off, int len)
    Parameters
    Type Name Description
    StringBuilder b
    int off
    int len

    Write(OpenStringBuilder)

    A StringBuilder that allows one to access the array.

    Declaration
    public void Write(OpenStringBuilder arr)
    Parameters
    Type Name Description
    OpenStringBuilder arr

    Write(char)

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual void Write(char b)
    Parameters
    Type Name Description
    char b

    Write(char[])

    A StringBuilder that allows one to access the array.

    Declaration
    public void Write(char[] b)
    Parameters
    Type Name Description
    char[] b

    Write(char[], int, int)

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual void Write(char[] b, int off, int len)
    Parameters
    Type Name Description
    char[] b
    int off
    int len

    Write(int)

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual void Write(int b)
    Parameters
    Type Name Description
    int b

    Write(string)

    A StringBuilder that allows one to access the array.

    Declaration
    public virtual void Write(string s)
    Parameters
    Type Name Description
    string s

    Write(StringBuilder)

    A StringBuilder that allows one to access the array.

    Declaration
    public void Write(StringBuilder arr)
    Parameters
    Type Name Description
    StringBuilder arr

    Implements

    J2N.Text.ISpanAppendable
    J2N.Text.IAppendable
    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.