MidStr返回指定范围内的字符串。该函数有三个参数。第一个参数为源字符串,第二个参数为起点(下标从1开始),第三个参数为结束点。通过第二、第三个参数则可指定要复制字符串的范围。

function MidStr(const AText: string; const AStart, ACount: Integer):String;
返回字符串AText从AStart开始的ACount个字符.
s:='abcdefg' 想取出 'cde' 这个子串:
uses StrUtils;
subs:=MidStr(s, 3, 3);
则subs为cde.



相关文章:

  • 2022-12-23
  • 2021-08-19
  • 2021-10-09
  • 2021-06-19
  • 2022-12-23
  • 2022-12-23
  • 2021-11-04
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
  • 2021-08-07
  • 2022-12-23
  • 2021-12-23
相关资源
相似解决方案