Yeah I know which is why I agree with that point you made, I have created a new blog post where I have taken the code for indexOf() from java and modified it to work in this manner for ColdFusion.
-- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 On Fri, May 4, 2012 at 11:01 PM, Leigh <cfsearch...@yahoo.com> wrote: > > Andrew - Sorry if you misunderstood me. It is not a debate. It is a simple > explanation of how the method actually works. As the earlier example > demonstrated, indexOf does not behave in a typeless manner - as most would > expect from CF - and as arrayFind/FindNoCase do. So it does quite nicely > for case sensitive string searches. But if you fail to account for its > detection of data types, the results for numbers, dates, etcetera will > frequently be wrong. So like any other function, it is important to > understand how it operates so you can use it properly and avoid common > gotchas. > > -Leigh > ==== > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351002 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm