long time ago i had a function i wrote, but no idea where it is and i don't have an environment setup to do it.
simple if you have a boilerplate.
I need the count of occurrences of a string within a string.
I have a delimited string returned by a service and want to count the # of items easily.
newFunc (source_string, string_to_count)
example:
aware_field = 'AA@bb@cc@ddd@eeee@ff@gg@hh'
theNum = newFunc(aware_field, '@') /* returns 7 /
theNum = newFunc(aware_field, 'e') / returns 4 */
will be much appreciated!
PS _ I know I could do this in a While loop - not interested