比如说是xxx:yyy这样的字符串,使用如下的语句就可以了:
procedure TForm1.Button1Click(Sender: TObject);
var
str,str1,str2:string;
begin
str:='xxx:yyy';
str1:=copy(str,0,(pos(':',str)-1));
Label1.Caption:=str1;
str2:=copy(str,(pos(':',str)+1),length(str));
Label2.Caption:=str2;
end;