function Mid(const StartIndex, Count: Integer): Substring;
Count characters from StartIndex (0-based), both inside the text, else ESubstringRangeError is raised.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | StartIndex | Integer | |
| 2 | Count | Integer |
Returns: Substring - The part. A part of a long text or of an adopted string shares its characters instead of copying them.
Examples
A part of a text.
uses Substr;
procedure Example;
begin
Assert(Substring('abcdef').Mid(2, 3) = 'cde');
end;
See Also: Substring.Substring, Substring.Substring