Jump to content


Check out our Community Blogs

SirStorm25

Member Since 26 Aug 2008
Offline Last Active Dec 06 2008 07:54 AM
-----

Posts I've Made

In Topic: Parsing TStrings!

04 October 2008 - 02:00 PM

Never-Mind! I found a fix, quite simple actually :D .


procedure TRTFFile.ParseDelimited(const S: TStrings; const Value: string; const Delimiter: string);
var
   Dx : integer;
   Ns : string;
   Txt : string;
   Delta : integer;
begin
   Delta := Length(Delimiter);
   Txt := Value + Delimiter;
   S.BeginUpdate;
   S.Clear;
   try
     while Length(Txt) > 0 do
     begin
       Dx := Pos(Delimiter, Txt);
       Ns := Copy(Txt,0,Dx-1);
       S.Add(Ns + '\line'); // Simply adds "\line" to the end of each parsed string.
       Txt := Copy(Txt,Dx+Delta,MaxInt);
     end;
   finally
     S.EndUpdate;
   end;
end;

Hope it helps anybody else who needs it ;)
Regards

SirStorm25.

In Topic: File - to - String!

14 September 2008 - 11:55 AM

Thanks for the reply!!!
How would I do that? (convert string to ansistring)??

or

How would I add unicode support to my application?

Regards
SirStorm25.

In Topic: Small Question - Files and Folders!

31 August 2008 - 12:23 PM

Thanks for the reply!!! =D

So, If I got a list of files and folders from these functions,
would I somehow be able to save there full paths to a file
e.g through a string list?

If so, how would I open the file and delete the files listed?

:D Regards
SirStorm25.

In Topic: Small Question - Files and Folders!

29 August 2008 - 07:11 AM

Any ideas...???

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download