aspose file tools
The moose likes Beginning Java and the fly likes How to find a special character in a string? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "How to find a special character in a string?" Watch "How to find a special character in a string?" New topic
Author

How to find a special character in a string?

Ravi Shankarappa
Ranch Hand

Joined: Jan 09, 2010
Posts: 55
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
The String.indexOf method comes to mind. Double quotes can be used in a string by prefixing them with a backslash.


Android appsImageJ pluginsJava 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