ASP function to count how many time a string does appear in another one with asp and vbscript
Techniques
This section makes it possible to gather a whole of techniques or scripts which have the originality to manage to solve a difficulty with the least effort or which are particularly effective...The grayed entries relate to the future headings which will supplement soon this toolbox.
Techniques / Count the number of time a string does appear in another one
- Script: Count how many times a string appear in another one
<%
Function NbOccurence(strChaineInit, strChaineRecherche)
NbOccurence = UBound(Split(strChaineInit, strChaineRecherche))
End Function
'How to call the function
chaine_initiale = "Here is the first string"
chaine_recherche = "i"
Response.Write "The string : " & _
chaine_recherche & " has been found : " & _
NbOccurence(chaine_initiale, chaine_recherche) & _
" time in the original string : " & chaine_initiale
%>
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'dypso'@'172.20.245.27' (using password: YES) in /mnt/115/sdb/3/1/dypso/include/tools.php on line 106
Impossible de se connecter : Access denied for user 'dypso'@'172.20.245.27' (using password: YES)



