Delete a char of a given string  

Send By: Q3 Team
Web : http://www.q3.nu
Email: dlib@q3.nu
Date: 12/09/99

Tip accessed 496 times

 


For example, delete the commas in a number string



 function stripped(stripchar : char; str : string) : string;
 var
   tmpstr : string;
 begin
   tmpstr := str;
   while pos(stripchar, tmpstr) > 0 do
     delete(tmpstr, pos(stripchar, tmpstr), 1);
   stripped := tmpstr;
 end;




Call example:


 	Label1.Caption:=stripped(',','123,456');



Updated at 12/09/99
Tipographic error..