[Issue 2201] Doc/Behavior Discrepancy: EndOfLine in string turns to "\n" or system-specific?

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jul 8 09:34:47 PDT 2008


http://d.puremagic.com/issues/show_bug.cgi?id=2201





------- Comment #4 from shro8822 at vandals.uidaho.edu  2008-07-08 11:34 -------
(In reply to comment #2)
> (In reply to comment #1)
> 
> Ok, I just looked it up. According to the documentation
> 
> "All characters between the r" and " are part of the string except for
> EndOfLine which is regarded as a single \n character."
> 

I think theres some verbiage to the effect of the current behavior (but applied
to the language text as a whole) Copy/Paste that in there or maybe even just
drop the above quoted all together and I think this can be closed.

(In reply to comment #3)
> Only solution I can
> think of is that maybe the compiler somehow remembers that the string literal
> was put there by a string mixin and therefore should keep line-endings as-is.

That's as good as anything I have though of.


Also, (untested) I think this edit will make it work:

mixin(makeStrReturnFunc("carriageReturn", "\r"));
mixin(makeStrReturnFunc("carriageReturn", r"\r"));

you might need to drop the r in the mixin maker as well.


-- 



More information about the Digitalmars-d-bugs mailing list