Perhaps adding confusion to all of this is that the java.lang.String
class also has an 'indexOf' method that does find substrings within
the string.  But the 'indexOf' that a CF array has (a java.util.List)
finds the array index of an exact element.

cheers,
barneyb

On Jan 8, 2008 12:15 PM, Charlie Griefer <[EMAIL PROTECTED]> wrote:
> On Jan 8, 2008 11:23 AM, Che Vilnonis <[EMAIL PROTECTED]> wrote:
> > Charlie/Barney, I've simplified things a bit and changed the code to read
> > "indexOf". Take a look at the both versions of code below. The version of
> > Rupesh's code works, yet my version does not. Since his code does work, I
> > *should* be able to find the value substring in an array of strings using
> > this method. Any ideas what might be wrong?
>
> why do you say you should be able to find a substring value using indexOf()?
>
> if you change Rupesh's code to this:
>
> <cfset pos = y.indexOf('damo') + 1 />
>
> it doesn't work.  you're saying that the substring 'damo' should be
> found int he array element 'damon'.  i'm not seeing that behavior in
> testing.
>
> --
> "Scientists tell us that the fastest animal on earth, with a top speed
> of 120 feet per second, is a cow that has been dropped out of a
> helicopter." - Dave Barry
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:296189
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to