function MidStr(const AText: Substring; const AStart, ACount: Integer): Substring; overload; inline;
ACount characters of AText from AStart (1-based).
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AText | Substring | |
| 2 | AStart | Integer | |
| 3 | ACount | Integer |
Returns: Substring - The part, as Mid returns it.
Remarks:
A range outside the text raises ESubstringRangeError.
Examples
A part from a 1-based start.
uses Substr;
procedure Example;
begin
Assert(MidStr(Substring('abcdef'), 2, 3) = 'bcd');
end;