scar, even though there is probably one.
It just counts how much a string appears in a string.
SCAR Code:
Function CountStr(StrToCount, Str: string): integer;
begin
repeat
if (Pos(StrToCount, Str) <> 0) then
begin
Delete(Str, Pos(StrToCount, Str), Length(StrToCount));
Inc(Result);
end;
until(Pos(StrToCount, Str) = 0);
end;
Please report if it doesn't work.
Thanks To:
Santa_Clause
&
mixster
For Helping me improve my script.
'Pos' definition:
SCAR Code:
function pos(substr, s: string): LongInt;
//Returns position of substring in string. Returns 0 if not found.