var S: String; I: Integer; begin S := Edit1.Text; I := Pos(' ', S); if I <> 0 then Delete(S, I, Length(S) - I + 1); Label1.Caption := S; end;