aspose file tools*
The moose likes Beginning Java and the fly likes How to test whether String A contains String B Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to test whether String A contains String B" Watch "How to test whether String A contains String B" New topic
Author

How to test whether String A contains String B

calvin yao
Greenhorn

Joined: Jul 05, 2002
Posts: 10
hello,
I want to see if String A contains String B.
like this:
String A = "java, c#, delphi";
String B = "java";
then String A contains String B;
but how can I get its result. Which API shall I use?
thx a lot!
Peter Phung
Ranch Hand

Joined: Dec 06, 2001
Posts: 138
This sounds like a homework question so i'm not gonna give you much. But you should be looking at java.lang.string
http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html


Pete<br />"Reality is an illusion <br />brought on by a lack of <br />drink, drugs and smut"
 
jQuery in Action, 2nd edition
 
subject: How to test whether String A contains String B