Re: Substring with unknown length (newbie)



Lene wrote:
Search string[ i++]   until string [ i] = '>';
string [ i+1] := #0;

Just translate your thoughts directly to delphi...

var
  i:integer;
  s:string;

begin
  s:='test > text';
  i:=1;
  while (s[i]<>'>') do i:=i+1; // !no checks!
  setlength(s,i);
end;



.