Hy! What is the best way to find the first two Word in a string? For example, my string is an adress like : Cross Keys st 13. I need only 'Cross Keys' from it. Should I count the words in the string or there a better solution for that?
I can get the first and the last Word easily. I am new in Delphi. Thanks for the suggestions.
procedure SampleForm.ButtonClick(Sender: TObject);
var
st: string;
myString : string;
C: integer;
begin
st := Cross Keys st 13;
C:=LastDelimiter(' ',st);
myString := Copy(st,1,pos(' ',st)-1);
mystring:=Copy(st,C+1,length(st)-C);