本文整理自网络,侵删。
function GetStrtoend(StrSource, StrBegin: string): string; // (源字符串,开始字符串)var in_star: Integer;begin in_star := AnsiPos(StrBegin, StrSource); Result := copy(StrSource, in_star, length(StrSource) - in_star + 1);end;
procedure TForm1.Button1Click(Sender: TObject);beginMemo2.Text:=GetStrtoend(Memo1.Text,'Memo1');end;
相关阅读 >>
Delphi 获取随机字符串的方法 getrandomstring
更多相关阅读请进入《Delphi》频道 >>