On 7/5/06, Martin McClure <
[hidden email]> wrote:
> > aString.lastIndexOf("/"); ??
>
> This should be pretty close:
>
> aString lastIndexOf: $/
>
> Be careful of how the indexes are being used -- Smalltalk assigns the
> index 1 to the first character in a string, while I believe Java assigns
> that character the index 0.
>
> These methods may also differ in how they handle the case in which *no*
> / is found.
Yes, they do. In Java if the $/ isn't there you get back a -1, in
Smalltalk you get back a 0.
--
Jason Rogers
"Where there is no vision, the people perish..."
Proverbs 29:18