Show / Hide Table of Contents

Class FastString

Fast alternative of StringBuilder.

Inheritance
System.Object
FastString
FastStringWithPool
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: FastReport.Utils
Assembly: FastReport.OpenSource.dll
Syntax
public class FastString

Constructors

FastString()

Creates the new FastString object with default capacity.

Declaration
public FastString()

FastString(Int32)

Creates the new FastString object with initial capacity.

Declaration
public FastString(int initCapacity)
Parameters
Type Name Description
System.Int32 initCapacity

Initial capacity.

FastString(String)

Creates the new FastString object from initial string.

Declaration
public FastString(string initValue)
Parameters
Type Name Description
System.String initValue

Properties

Item[Int32]

Gets or sets the chars of string.

Declaration
public char this[int index] { get; set; }
Parameters
Type Name Description
System.Int32 index
Property Value
Type Description
System.Char

Char value

Length

Gets the Length of string.

Declaration
public int Length { get; set; }
Property Value
Type Description
System.Int32

StringBuilder

Gets StringBuilder

Declaration
public StringBuilder StringBuilder { get; }
Property Value
Type Description
System.Text.StringBuilder

Methods

Append(FastString)

Appends the another FastString object.

Declaration
public FastString Append(FastString fastString)
Parameters
Type Name Description
FastString fastString

FastString object.

Returns
Type Description
FastString

FastString object.

Append(Char)

Appends the string by char value.

Declaration
public FastString Append(char value)
Parameters
Type Name Description
System.Char value

Char value.

Returns
Type Description
FastString

FastString object.

Append(Object)

Appends the string by object data.

Declaration
public FastString Append(object value)
Parameters
Type Name Description
System.Object value

Object value.

Returns
Type Description
FastString

FastString object.

Append(String)

Appends the string by string value.

Declaration
public FastString Append(string value)
Parameters
Type Name Description
System.String value

String value.

Returns
Type Description
FastString

FastString object.

AppendFormat(String, Object[])

Append formatted string.

Declaration
public FastString AppendFormat(string format, params object[] args)
Parameters
Type Name Description
System.String format
System.Object[] args
Returns
Type Description
FastString

AppendLine()

Appends new line.

Declaration
public FastString AppendLine()
Returns
Type Description
FastString

FastString object.

AppendLine(String)

Appends the string by string value.

Declaration
public FastString AppendLine(string value)
Parameters
Type Name Description
System.String value

String value.

Returns
Type Description
FastString

FastString object.

Clear()

Clears the string.

Declaration
public FastString Clear()
Returns
Type Description
FastString

FastString object.

CopyTo(Int32, Char[], Int32, Int32)

Copies the substring in char array.

Declaration
public void CopyTo(int sourceIndex, char[] destination, int destinationIndex, int count)
Parameters
Type Name Description
System.Int32 sourceIndex

Start index in source.

System.Char[] destination

Destination array.

System.Int32 destinationIndex

Destination index.

System.Int32 count

Count of chars

IndexOf(String, Int32)

Index of substring.

Declaration
public int IndexOf(string value, int startIndex)
Parameters
Type Name Description
System.String value

Substring for search.

System.Int32 startIndex

Sarting position for search.

Returns
Type Description
System.Int32

Position of substring.

Insert(Int32, String)

Inserts string.

Declaration
public FastString Insert(int startIndex, string value)
Parameters
Type Name Description
System.Int32 startIndex

Start index in existing string.

System.String value

Value of inserting string.

Returns
Type Description
FastString

FastString object.

IsEmpty()

Checks the empty array.

Declaration
public bool IsEmpty()
Returns
Type Description
System.Boolean

True if string is empty.

Remove(Int32, Int32)

Removes substring.

Declaration
public FastString Remove(int startIndex, int length)
Parameters
Type Name Description
System.Int32 startIndex

Start index of removed string.

System.Int32 length

Length of removed string.

Returns
Type Description
FastString

FastString object.

Replace(String, String)

Replacing the substring on other.

Declaration
public FastString Replace(string oldValue, string newValue)
Parameters
Type Name Description
System.String oldValue

Old string value.

System.String newValue

New string value.

Returns
Type Description
FastString

FastString object.

Substring(Int32, Int32)

Returns the substring.

Declaration
public string Substring(int startIndex, int length)
Parameters
Type Name Description
System.Int32 startIndex

Starting index.

System.Int32 length

Length of substring.

Returns
Type Description
System.String

Substring.

SubstringCompare(Int32, String)

Compare of substring in position.

Declaration
public bool SubstringCompare(int startIndex, string value)
Parameters
Type Name Description
System.Int32 startIndex

Starting index for comparsion.

System.String value

Value for compare.

Returns
Type Description
System.Boolean

True if substring is identical in position.

ToString()

Converts the array in string.

Declaration
public override string ToString()
Returns
Type Description
System.String

String value.

Overrides
System.Object.ToString()
Back to top Generated by DocFX