functionCountstr (str1, str2)
dimtmp, i, j
ifstr1 = "" orisnull (str1) dann
J = 0
elseifstr2 = "" orisnull (str2) dann
J = 1
anders
tmp = split (str1, str2)
J = 0
fei = 0Toubund (TMP)
IFTMP (i) <> "" thenj = j+1
nächste
Endif
countstr = j
Endfunktion