FunctionCountstr (STR1, STR2)
dimtmp, i, j
ifstr1 = "" orisnull (str1) puis
j = 0
elseifstr2 = "" orisnull (str2) puis
j = 1
autre
TMP = Split (STR1, STR2)
j = 0
fori = 0Toubound (tmp)
iftmp (i) <> "" alorsj = j + 1
suivant
endire
COMPTSTR = J
finition de fin