本文整理自网络,侵删。

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);beginMemo1.Text:=DeleteUntilLast(Edit1.Text,Edit2.Text);end;
相关阅读 >>
Delphi xe5 android实现繁体字到简体字的转换函数
更多相关阅读请进入《Delphi》频道 >>