Club Delphi,
Para contribuir a la idea de ecfisa:
Código Delphi
[-]
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure Split(const Delimiter: Char; Input: string; const Strings: TStrings);
begin
Strings.Clear;
Strings.Delimiter := Delimiter;
Strings.DelimitedText := Input;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
StrList: TStringList;
i : Integer;
s : String;
begin
StrList := TStringList.Create;
try
Split(' ', 'Hola Test Mundo', StrList) ;
for i := 0 to StrList.Count - 1 do
ShowMessage(StrList[i]);
for i:= 0 to StrList.Count - 1 do
if StrList[i] <> 'Test' then
s := s + ' ' + StrList[i];
ShowMessage(s);
finally
StrList.Free;
end;
end;
end.
Espero sea útil
Nelson.