Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function Insert(const StartIndex: Integer; const S: Substring): Substring; overload; | A copy of this string with S inserted at StartIndex; this string is unchanged. |
| 2 | function Insert(const StartIndex: Integer; const S: string): Substring; overload; |
Overload 1: function Insert(const StartIndex: Integer; const S: Substring): Substring; overload;
A copy of this string with S inserted at StartIndex; this string is unchanged.
| # | Name | Description |
|---|---|---|
| 1 | StartIndex | 0-based, from 0 to Length; outside it ESubstringRangeError is raised. |
| 2 | S | The text inserted, every text kind. |
Returns: Substring - The new value.
Examples
Inserting a character.
uses Substr;
procedure Example;
begin
Assert(Substring('ace').Insert(1, 'b') = 'abce');
end;
Overload 2: function Insert(const StartIndex: Integer; const S: string): Substring; overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | StartIndex | Integer | |
| 2 | S | string |
Returns: Substring