Represents a chunk of text and provides access to the text lines.
sealed class
|
Text
|
public
property
|
Length
{
get
}
|
||
type
|
int32
|
||
value
|
public
property
|
LineCount
{
get
}
|
||
type
|
int32
|
||
value
|
public
property
|
MaxLineLength
{
get
}
|
||
type
|
int32
|
||
value
|
public
property
|
Value
{
get
}
|
||
type
|
string
|
||
value
|
Creates a new instance of Text.
public
static
method
|
For
(string text)
|
||
type
|
Text
|
||
params
|
text
|
[not-null]
|
The text string value. |
returns
|
|
The created Text object. |
Returns the index-th line of text.
[Pure]
|
||||
public
method
|
Line
(int32 index)
|
|||
type
|
string
|
|||
params
|
index
|
[0..LineCount-1]
|
The zero-based line index. | |
returns
|
|
The line of text. |
Returns the index of the text line that contains the given offset.
[Pure]
|
||||
public
method
|
LineAt
(int32 offset)
|
|||
type
|
int32
|
|||
params
|
offset
|
[0..Length]
|
The text offset. | |
returns
|
|
The zero-based line index. |
Returns the end offset of the index-th line.
[Pure]
|
||||
public
method
|
LineEnd
(int32 index)
|
|||
type
|
int32
|
|||
params
|
index
|
[0..LineCount-1]
|
The zero-based line index. | |
returns
|
|
The line end offset (exclusive). |
Returns the length of the index-th line.
[Pure]
|
||||
public
method
|
LineLength
(int32 index)
|
|||
type
|
int32
|
|||
params
|
index
|
[0..LineCount-1]
|
The zero-based line index. | |
returns
|
|
The line length. |
Returns the start offset of the index-th line.
[Pure]
|
||||
public
method
|
LineStart
(int32 index)
|
|||
type
|
int32
|
|||
params
|
index
|
[0..LineCount-1]
|
The zero-based line index. | |
returns
|
|
The line start offset (inclusive). |
Returns the offset of the given text location.
[Pure]
|
||||
public
method
|
OffsetAt
(int32 row,
int32 column)
|
|||
type
|
int32
|
|||
params
|
row
|
[0..LineCount-1]
|
The zero-based line index. | |
column
|
[>=0]
|
The zero-based column index. | ||
returns
|
|
Offset of text location. |
public
override
method
|
ToString
()
|
||
type
|
string
|