自己写应该没什么问题吧
可以用pos函数啊
function Fre(substr: String;desStr: String): Integer;
var n, m,p,q: Integer;
begin
m := 0;
n := pos(substr,desstr);
while(n <&gt
0) do
begin
inc(m);
p := n + length(substr);
q := length(desstr) - p + 1;
desstr := copy(desstr,p,q);
n := pos(substr,desstr)
end;
result := m;
end;