-
String parsing
Hi,
Cud someone pleeez give me a jsp code for seperating each word in a string and storing them in an array and later compare each word in the array with database entries.
-
I don't know what "jsp code" you might be referring to, but for java, you might use
Scanner myScan = new Scanner( yourString );
this will give you an array of words.
Then, to read the myScan array,
while( myScan.hasNext() )
{
this.find( myScan.next() );
}
-
-
If you are using Java 5, you will like the flexibility and extensive coverage of the Scanner class.
Similar Threads
-
By mdengler in forum ASP.NET
Replies: 0
Last Post: 11-26-2002, 02:32 PM
-
By Fred Mayes in forum Java
Replies: 1
Last Post: 06-05-2001, 06:12 AM
-
By Julian Milano in forum VB Classic
Replies: 2
Last Post: 08-11-2000, 12:11 PM
-
By chandra in forum VB Classic
Replies: 0
Last Post: 06-22-2000, 07:36 AM
-
By Robert Rieth in forum VB Classic
Replies: 1
Last Post: 04-11-2000, 03:21 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks