>> Say I have a String in Java like
>>
>> "To be or not to be, that is the question. ...
It would be a question Willie, if you'd added a freakin'
question mark*. (That's /always/ bugged me.)
>If there is a new line in the input String, it's easy. There are several
>methods in the String class that can detect where the '\n' is; see the Javadocs.
What about \r, or (what was it?) \n\r. Doing a
String.split() on both should do the trick, though.
>If there is no new line in the input you're SOL.
How about storing the original text as CDATA,
instead of splitting it into two fields?
Does that retain the formatting of the original
statement?
* And don't start with me about whether question marks
were used in Shakespeare's day. The question mark
dates from around the 7th to 9th centuries, according
to Wikipedia.

Signature
Andrew Thompson
http://www.athompson.info/andrew/
JT - 10 Jun 2007 15:47 GMT
>>> Say I have a String in Java like
>>>
[quoted text clipped - 20 lines]
> dates from around the 7th to 9th centuries, according
> to Wikipedia.
<sarcasm>
And wikipedia is always 100% accurate?
</sarcsasm>
just kidding.
Lew - 10 Jun 2007 16:40 GMT
>>>> Say I have a String in Java like
>>>>
>>>> "To be or not to be, that is the question. ...
>>
>> It would be a question Willie, if you'd added a freakin' question
>> mark*. (That's /always/ bugged me.)
You misconstrue the meaning of the word "question" in this context - it is
used in the sense of "issue" or "matter", as in "The Irish Question".
<http://en.wikipedia.org/wiki/A_Modest_Proposal>
I see no grammatical issue in omitting the question mark.

Signature
Lew
JT - 10 Jun 2007 17:10 GMT
> You misconstrue the meaning of the word "question" in this context - it
> is used in the sense of "issue" or "matter", as in "The Irish Question".
> <http://en.wikipedia.org/wiki/A_Modest_Proposal>
>
> I see no grammatical issue in omitting the question mark.
And you are replying to me because?
Twisted - 10 Jun 2007 21:18 GMT
> >>>> Say I have a String in Java like
>
[quoted text clipped - 8 lines]
>
> I see no grammatical issue in omitting the question mark.
Regardless. "To be or not to be?" might be a question, but "To be or
not to be, that is the question." is a statement. (A statement that
something else is a question. Confused yet?)
ObTheTopic: Eclipse rulz!