Article View: aus.computers.java
Article #980Re: Searching a string in Java for a Substring, anyone know how?
From: Goo
Date: Sat, 13 Nov 1999 00:00
Date: Sat, 13 Nov 1999 00:00
20 lines
1459 bytes
1459 bytes
In article <382c242b.4852097@news.mtt.net>, ronnie gillis <warren.buffet@usa.net> wrote: >I have a computer assignment that is due next week and we have to be >able to search a string entered by the user, for a substring that is >entered by another user. We have only just learned the basics of >Java and some methods and designing classes. We are just in the midst >of learninig if statements and it somehow must relate to this but I >can't wrap my head around it. We haven't used many methods that would >search a string. PLEASE HELP!!!!!!!!!!!!!!!!! Umm, how about looking at the API documentation, specifically for the methods contained withing the String class? There is actually a method called 'substring' which does exactly what you want. You can download a copy of the API docs from http://java.sun.com. HTH, goo
Technical Details
Message-ID:
<80jeuh$30h$1@zipperii.zip.com.au>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<382c242b.4852097@news.mtt.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d6db,48eb6f058b5ae742 X-Google-Attributes: gid10d6db,public From: gumby@zipworld.com.au (Goo) Subject: Re: Searching a string in Java for a Substring, anyone know how? Date: 1999/11/13 Message-ID: <80jeuh$30h$1@zipperii.zip.com.au> X-Deja-AN: 548086433 References: <382c242b.4852097@news.mtt.net> X-Complaints-To: news@zipworld.com.au X-Trace: the-fly.zip.com.au 942489361 3673 203.12.97.87 (13 Nov 1999 10:36:01 GMT) Organization: Zip World/Pacific Internet NNTP-Posting-Date: 13 Nov 1999 10:36:01 GMT Newsgroups: aus.computers.java