function findCount(const S, sFind: string): Integer;
var
i: Integer;
begin
i := 1;
Result := 0;
while i <= length(s)-length(sFind)+1 do
begin
if comparemem(@(s), @(sFind[1]), length(sFind)) then
begin
Inc(Result);
Inc(i, length(sFind));
end
else if byte(S)>128 then
Inc(i, 2)
else Inc(i);
end;
end;
支持中文和英文