aspose 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
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply 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.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: finding a sequence in the string
 
Similar Threads
What is the diff b/w string & String buffer?
Job Offer in Symphny
Passed SCWCD 1.4 with 85%
assed SCJP1.4 with 88%
150 MB attachment on Jboss