In most cases it is probably ok. You might possible want to
use a case sensitve replace. You would see a difference in outputt
between this method and if you wrote a loop to scan for the string.
For example if haystack = '2525252' and needle = '252' the result
would be 2 instead of 3 because the overlap is not
considered.
True - In my case I was looking to count the number of
slashes in a file/directory name from cfdirectory to determine how
deep a file was in that directory.
eightcharacters wrote:
> True - In my case I was looking to count the number of
slashes in a file/directory name from cfdirectory to determine how
deep a file was in that directory.
Do you want the number of slashes or the number of elements
between the
slashes?