File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes quote Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "quote" Watch "quote" New topic
Author

quote

kavins
Greenhorn

Joined: Sep 14, 2002
Posts: 15
Say for example I have a very large string "A........................Z"
Within the string I have several " ie
"A........."..........".........Z".
What should I do so that the compiler ignores the quotes present WITHIN the string.
My first option was to actually place \ infront of the quote within the string.
But since my actuall string is large it is not feasible to put \ manually.

Is there an example which I can refer to?
Ray Stojonic
Ranch Hand

Joined: Aug 08, 2003
Posts: 326
use your editor to do a find and replace: find ", replace with \"
kavins
Greenhorn

Joined: Sep 14, 2002
Posts: 15
Originally posted by Ray Stojonic:
use your editor to do a find and replace: find ", replace with \"


I dont think so thats feasible for a very large environment where the number of files is humangous.
I am working on the code for it right now.
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18829
    
  40

Originally posted by kavins:

I dont think so thats feasible for a very large environment where the number of files is humangous.
I am working on the code for it right now.


This problem only exist for Java files, as the compiler needs to figure out when a string starts and stops. It should be okay, for text files of strings. It should just be any other character read from a file.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: quote