Home  |  Delphi .net Home  |  System.String  |  Remove Method
  
Remove  
Method  
Removes a number of characters from a string
String Class
System NameSpace
CF1.  Function Remove ( Start : Integer; Count : Integer ) : String;
CF : Methods with this mark are Compact Framework Compatible
Description
Attempts to remove up to Count characters from the current string, from the Start character index.
Notes
Very Important : Methods in .Net treat strings as starting at 0, unlike traditional Delphi where they started at 1.

Like a lot of string methods, the string object itself is not affected - the modified string is returned for assignment.
Microsoft MSDN Links
System
System.String
 Author links

 Buy Website Traffic at
 Buywebsitetrafficexperts.com

 Buy Proxies at
 Buyproxies.io
 
 
 
A simple example
program Project1;
{$APPTYPE CONSOLE}

var
  strA, strB     : String;

begin
  strA := '123456789';

  strB := strA.Remove(5,2);

  Console.WriteLine('strA = ' + strA);
  Console.WriteLine('Removing 2 chars from index=5');
  Console.WriteLine('strB = ' + strB);

  Console.ReadLine;
end.
   strA = 123456789
   Removing 2 chars from index=5
   strB = 1234589
 
 
Delphi Programming Neil Moffatt 2002 - 2017. All rights reserved.  |  Contact the author