Split String 1
If you want to split string from TStringList you can use this little code.
procedure Split(const str1:string; const sep:string; LT:TStringList);
var
i:Integer; {Holds the Real Pos}
t:AnsiString; {Holds the String}
i2:integer; {Holds the second pos}
begin
i:=1;
t:=str1;
repeat
t:=AnsiRightStr(t,Length(t)-i-Length(sep)+1);{Gets the right of the the string at the pos of the separator}
i:=AnsiPos (sep,t);{Gets the pos(Holds it)}
i2:=AnsiPos(sep,t); {The real pos(USes it)}
if AnsiLeftStr(t,i2-1)= ” then {Checks if the string is empty}
begin{Do nothing if is}
end
else
begin
LT.Add(AnsiLeftStr(t,i2-1)); {Adds to the TStringList}
end;
until i=0;{^Does above until the no more seperators}
end;
A text replace function for strings. function Replace...
With the following function we can use the GetAliasParams me...
Use this to close all open Internet Explorer windows. ...
One package providing all grid components of TMS software....
TableReport is a band-oriented report generator for Delphi 5...
Thursday 15 Feb 2007 | Delphi Tutorial | Strings