Posted: Tue Oct 23, 2007 9:41 am Post subject: string.indexof question
im in class and my teacher is trying to teach us how to use . length
in "somestring.indexof(0,0) what does the second 0 do? my teacher is unsure of this can any one help? a quick answer would be realy helpful
Sponsor Sponsor
rdrake
Posted: Tue Oct 23, 2007 9:52 am Post subject: Re: string.indexof question
A whisper in my ear tells me it would do this:
Quote:
indexOf(String str, int fromIndex)
Returns the index within this string of the first occurrence of the specified substring, starting at the specified index.
So uh... probably the same thing as
Java:
indexOf(0)
in this case.
HeavenAgain
Posted: Tue Oct 23, 2007 10:40 am Post subject: RE:string.indexof question
i believe it does something like this
api is always useful, and you can always test out the code at the interaction.
Aziz
Posted: Sun Oct 28, 2007 12:46 pm Post subject: RE:string.indexof question
Whoa whoa whoa. Don't link him to old docs. 1.4 is much different than 1.6, though not in this case.