- 人气:
- 放大
- 缩小
- 二维码
- 赞赏
delphi 获取指定字符串后面的所有的字符串
function DeleteUntilLast(const Text, UntilLastStr: string): string;
var
i: Integer;
begin
Result := Text;
i := pos(UntilLastStr, Result);
while i > 0 do
begin
Delete(Result, 1, i);
i := pos(UntilLastStr, Result);
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Memo1.Text:=DeleteUntilLast(Edit1.Text,Edit2.Text);
end;