functionCountStr (STR1, STR2)
dimtmp, i, j
ifstr1 = "" orisnull (str1) entonces
J = 0
elseifstr2 = "" orisnull (str2) entonces
J = 1
demás
TMP = Split (Str1, Str2)
J = 0
fori = 0toUbound (TMP)
iftmp (i) <> "" entoncesj = j+1
próximo
endif
countstr = j
Función final