The Artima Developer Community
Sponsored Link

Java Answers Forum
Need Help with String Search

2 replies on 1 page. Most recent reply: Oct 19, 2005 11:10 AM by Trevor Hatcher

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
T Paul

Posts: 1
Nickname: useless
Registered: Sep, 2005

Need Help with String Search Posted: Sep 30, 2005 3:17 PM
Reply to this message Reply
Advertisement
Note: I'm askingcould somebody provide any guidance..Not the exact code.. on properly setting up bounding/searching a string when I used the str.indexOf('$'); as My marker...


Subodh Rawat

Posts: 9
Nickname: zeon
Registered: May, 2005

Re: Need Help with String Search Posted: Sep 30, 2005 4:28 PM
Reply to this message Reply
Hi Paul,

Try to use
str.indexOf("$") this will return the index value greate then -1 , if it return -1 it means string doesn't exsist.

-Zeon

Trevor Hatcher

Posts: 10
Nickname: newbie05
Registered: Oct, 2005

Re: Need Help with String Search Posted: Oct 19, 2005 11:10 AM
Reply to this message Reply
test this out
public class indexof
{
public static void main(String[]args)
{
string a= ("abcde")
indexOf.a(2,5)
System.out.println(a)
}
}

Flat View: This topic has 2 replies on 1 page
Topic: How do we induce the locale in to an exception? Previous Topic   Next Topic Topic: Java and XML

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use