Class OpenStringBuilder
A StringBuilder that allows one to access the array.
Inheritance
OpenStringBuilder
Implements
ISpanAppendable
IAppendable
ICharSequence
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
Field Value
m_len
A StringBuilder that allows one to access the array.
Declaration
Field Value
Properties
Array
A StringBuilder that allows one to access the array.
Declaration
public virtual char[] Array { get; }
Property Value
Capacity
A StringBuilder that allows one to access the array.
Declaration
public virtual int Capacity { get; }
Property Value
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
Length
Gets the number of characters in this sequence.
Declaration
public virtual int Length { get; set; }
Property Value
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
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
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
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
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
Append(ReadOnlySpan<char>)
A StringBuilder that allows one to access the array.
Declaration
public virtual OpenStringBuilder Append(ReadOnlySpan<char> value)
Parameters
Returns
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
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
Returns
Append(StringBuilder)
A StringBuilder that allows one to access the array.
Declaration
public virtual OpenStringBuilder Append(StringBuilder csq)
Parameters
Returns
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
Returns
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
Reset()
A StringBuilder that allows one to access the array.
Declaration
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
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
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
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
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
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
Write(OpenStringBuilder)
A StringBuilder that allows one to access the array.
Declaration
public void Write(OpenStringBuilder arr)
Parameters
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
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
Implements
J2N.Text.ISpanAppendable
J2N.Text.IAppendable
J2N.Text.ICharSequence