delphi 截取两个字符之间的内容

2018-10-30

delphi 截取两个字符之间的内容


function copyBegin2EndStr(begindex, endindex, source: string): string; //截取两个字符之间的内容
var
  n, m: Integer;
begin
  n := Pos(begindex, source);
  m := Pos(endindex, source);
  Result := Copy(source, n + 1, m - n - 1);
end;

阅读81