#int(listlen(mystring,"##")-1)#

> There's always the brute force method:

> <cfset count=0>
> <cfloop from="1" to="#Len(myString)#" index="i">
>  <cfif Mid(myString,i,1) EQ "##">
>   <cfset count=count+1>
>  </cfif>
> </cfloop>

> Not very elegant and for very large strings will not
> perform well.


>> My new question is this. Occasionally the "Products"
>> value
>> will have a #
>> that I need to keep, so I'll need to split on the last #
>> in
>> the string.
>> Looking through the CF String Manipulation functions, I
>> don't see
>> anything that will return a count of a particular
>> character. I haven't
>> found any on cflib.org as well.
>>
>> How could I find how many of a certain characters are in
>> a string?
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~~~~~~~|
> Archives:
> http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
> Subscription: http://www.houseoffusion.com/index.cfm?sideb
> ar=lists&body=lists/cf_talk
> FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
> Structure your ColdFusion code with Fusebox. Get the
> official book at http://www.fusionauthority.com/bkinfo.cfm


Isaac
Certified Advanced ColdFusion 5 Developer

www.turnkey.to
954-776-0046

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to