PDA

View Full Version : Catch "soft line breaks"


Malin
05-17-2004, 05:10 AM
I'm working on a quote function and I want to use a prefix for each quoted new line, like many e-mail clients do.

Example:

>This is old text
>This is old text

This is new text

-------------
Ok, it is simple if you use the vbcrlf like:
'quoteText = Replace(quoteText, "
", vbcrlf & ">")

But this is ugly because vbcrlf is carriage returns (hard line breaks) and I want to have the prefix for the soft natural line breaks as well.

I made this string function, looping thing and it worked fine..until I quoted the second time - quoted a message that already contained quoted text. It looked like:

>>This is old text from the last quote jsdgkjehjri rejhtprtojh fdhtjy erhy6trjtyk
>This is also old text from the last quote fgth >rthrtj jsdgkjehjri rejhtprtojh

>This is the new quoted text

This is new text


I want it to add one ">" for each time the text is quoted. I always want the ">>" to be at the beginning of a new line - and together. Not separated.

Is there someone here who can help me [:)]?

Malin

bluebeard96
05-31-2004, 11:20 AM
What does your code look like?