File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes lastIndexOf Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "lastIndexOf" Watch "lastIndexOf" New topic
Author

lastIndexOf

Sushma
Ranch Hand

Joined: Feb 24, 2000
Posts: 36
Can somebody help me how the lastIndexOf operator with and without offset works???
Regards,
Sushma
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Sushma,
1. s.lastindexof(int ch) returns a value k
where k is the largest possible value and <= s.length
and s.charAt(k) = ch
2. s.lastindexof(int ch, int offset) returns a value k
where k is the largest possible value and <= offset
and s.charAt(k) = ch

Originally posted by Sushma:
Can somebody help me how the lastIndexOf operator with and without offset works???
Regards,
Sushma

Sushma
Ranch Hand

Joined: Feb 24, 2000
Posts: 36
Thanks a lot QTE Reddy.....that was really very helpful.
Sushma
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: lastIndexOf
 
Similar Threads
lastIndexOf() Question
find an index of a specific string starting at a given index in reverse order
Splitting a String problem
indexOf
Finding last index of space