Question

i have Muptiple line text in notepad (more than 10,000).

my java program assign all text to single String

EX:
String text="here big text"

after copy the notepad text assign to

String text="...
...
...
...
...
..
n line"  

i got above format

how to change multiple line text to single line.

Available at any eclipse shortcut or any way

Was it helpful?

Solution 3

In eclipse

Windows/Preferences/Java/Editor/Typing/ "Escape text when pasting into a string literal"

OTHER TIPS

Use '+' operator and format it in eclipse.It will treat it as a single line.

Select the text and make a Find/Replace with the "Regular expressions" option checked and replace:

\R

for:

" +\R"

This will facilitate the work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top