How to count characters in a string

Hello again,
I need to count all the characters that a string contains. For example:

#string#="directory/subidretory/index.html"

I need to know how many slashes are in this string. I can't find any funcion that finds characters asd PHP, any idea?
 
Hello

You can use ListLen(string, "/"), this will split the string on each / you will then need to -1 from the count of the result and this should give you the /

<cfset slashCount = ListLen(string, "/") - 1>

Thanks

J
 
Back
Top