Description |
A new string is created that contains the source string with Value string inserted at the Start position.
Note that the method leaves the original string unchanged.
Essentially, the Start value can alternatively be treated as a count of characters before the string is inserted.
|
| Notes | Very Important : Methods in .Net treat strings as starting at 0, unlike traditional Delphi where they started at 1.
|
|
Microsoft MSDN Links |
system
system.String
|
|
|
A simple example |
program Project1;
{$APPTYPE CONSOLE}
var
strA, strB, strC : String;
begin
strA := '123456789';
strB := '------';
Console.WriteLine('strA = ' + strA);
Console.WriteLine('strB = ' + strB);
strC := strA.Insert(4, strB);
Console.WriteLine('strC = ' + strC);
Console.ReadLine;
end.
| Show full unit code | strA = 123456789
strB = ------
strC = 1234------56789
|
|
|
|