A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
Arduino in Action
this week in the
General Computing
forum!
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
JavaRanch
»
Java Forums
»
Java
»
Beginning Java
Author
How to find a special character in a string?
Ravi Shankarappa
Ranch Hand
Joined: Jan 09, 2010
Posts: 55
posted
Sep 10, 2011 06:40:34
0
Hi,
I need to find if a line contains "CODE" . The two " are also part of the search. How do I do this using
StringTokenizer
? Or is there a better way?
-Ravi
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35439
9
posted
Sep 10, 2011 06:47:48
2
The String.indexOf method comes to mind. Double quotes can be used in a
string
by prefixing them with a backslash.
Android apps
–
ImageJ plugins
–
Java web charts
I agree. Here's the link:
http://zeroturnaround.com/jrebel
- it saves me about five hours per week
subject: How to find a special character in a string?
Similar Threads
green horn, ranch hand, not related to java
date i18n
how do I find date difference in months
searching in saloon.javaranch.com for the last 3 months
Suggestions on database
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter