Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
32
Task/Tokenize-a-string/Delphi/tokenize-a-string-2.pas
Normal file
32
Task/Tokenize-a-string/Delphi/tokenize-a-string-2.pas
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
program TokenizeString;
|
||||
|
||||
{$APPTYPE CONSOLE}
|
||||
|
||||
uses
|
||||
Classes;
|
||||
|
||||
var
|
||||
tmp: TStringList;
|
||||
i: Integer;
|
||||
|
||||
begin
|
||||
|
||||
// Instantiate TStringList class
|
||||
tmp := TStringList.Create;
|
||||
try
|
||||
{ Use the TStringList's CommaText property to get/set
|
||||
all the strings in a single comma-delimited string }
|
||||
tmp.CommaText := 'Hello,How,Are,You,Today';
|
||||
|
||||
{ Now loop through the TStringList and display each
|
||||
token on the console }
|
||||
for i := 0 to Pred(tmp.Count) do
|
||||
Writeln(tmp[i]);
|
||||
|
||||
finally
|
||||
tmp.Free;
|
||||
end;
|
||||
|
||||
Readln;
|
||||
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue