File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes finding a sequence in the string Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "finding a sequence in the string" Watch "finding a sequence in the string" New topic
Author

finding a sequence in the string

abhijeet shrivastava
Greenhorn

Joined: Jan 05, 2007
Posts: 10
Hi ranchers,

I want to check for a specified sequence in a string like

String first = "Hi all this is abhijeet";

now i want to search for "abhijeet" in that.so what method should i use.
Kaustabh Singha Roy
Ranch Hand

Joined: Oct 04, 2005
Posts: 43
String.indexOf() or the String.lastIndexOf() should do it for you.
 
 
subject: finding a sequence in the string
 
Similar Threads
Job Offer in Symphny
Passed SCWCD 1.4 with 85%
assed SCJP1.4 with 88%
150 MB attachment on Jboss
What is the diff b/w string & String buffer?