本文整理自网络,侵删。
function Parse(text, sol, sag: string): String;begin Delete(text, 1, Pos(sol, text) + Length(sol) - 1); Result := Copy(text, 1, Pos(sag, text) - 1);end;
procedure TForm1.FormCreate(Sender: TObject);beginCaption:=Parse('123456789','12','89'); //结果 34567end;
相关阅读 >>
Delphi winapi: getclassname - 获取指定窗口的类名
winapi 字符及字符串函数(6): ischaralphanumeric - 是否是个文字(字母或数字)
Delphi中使用goo.gl(google的缩短url服务)api
更多相关阅读请进入《Delphi》频道 >>