In This Article

StringTextProvider Class

Represents an ITextProvider for a plain text string.

public class StringTextProvider : ITextProvider
Inheritance:
object object
Implements:
ITextProvider

Constructors

StringTextProvider(string)

Represents an ITextProvider for a plain text string.

public StringTextProvider(string text)
Parameter Type Description
text string

The text string.

Properties

FirstNonWhitespaceCharacterIndex

The first non-whitespace character index.

public int FirstNonWhitespaceCharacterIndex { get; }

Property Value

int

Length

The total number of available text characters.

public int Length { get; }

Property Value

int

Spacers

The collection of intra-text spacers.

public IList<ITextSpacer>? Spacers { get; }

Property Value

IList<ITextSpacer>

Methods

GetSubstring(int, int)

Returns a substring range of the text.

public string GetSubstring(int characterIndex, int characterCount)
Parameter Type Description
characterIndex int

The start character index.

characterCount int

The number of characters in the range.

Returns

string

Translate(int, TextProviderTranslateModes)

Translates the specified character index.

public int Translate(int characterIndex, TextProviderTranslateModes modes)
Parameter Type Description
characterIndex int

The character index to translate.

modes TextProviderTranslateModes

A TextProviderTranslateModes indicating the translate modes to use.

Returns

int

Inherited Members

Extension Methods