wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes simple String question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "simple String question" Watch "simple String question" New topic
Author

simple String question

Nikos Stavros
Ranch Hand

Joined: Feb 24, 2006
Posts: 243

Hi, there

say I wanted to change a String "I'm" in to "I\'m"

would I use this


that doesn't seem to work.


Jesus lives
Balasubramanian Chandrasekaran
Ranch Hand

Joined: Nov 28, 2007
Posts: 215

This one will do the trick

Nikos Stavros
Ranch Hand

Joined: Feb 24, 2006
Posts: 243

Thanks mate nice and helpful!

Merry Xmas
bart zagers
Ranch Hand

Joined: Feb 05, 2003
Posts: 234
Well, the behavior is mentioned in the Javadoc.
Apparently, the backslash and the $-sign have a special meaning and you have to do it like:
Balasubramanian Chandrasekaran
Ranch Hand

Joined: Nov 28, 2007
Posts: 215

Originally posted by bart zagers:
Well, the behavior is mentioned in the Javadoc.
Apparently, the backslash and the $-sign have a special meaning and you have to do it like:


Thanks Bart thats quite interesting.
Nikos Stavros
Ranch Hand

Joined: Feb 24, 2006
Posts: 243

I should read more Javadoc!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: simple String question
 
Similar Threads
How to convert integer variable to string representation
Removing specific character from the given String
Mock question of collection's toArray method
request.getParameter retuning null
how to sovle these two errors~~~help~~~