[Issue 589] New: std.string.newline should be char[] not char[2]

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Nov 23 16:05:26 PST 2006


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

           Summary: std.string.newline should be char[] not char[2]
           Product: D
           Version: 0.174
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: wbaxter at gmail.com


std.string.newline is char[2], which means if you do  

    "astring"~newline

on a platform where newline is "\n" you'll get a lovely bonus Null character in
your output.

It should either be made char[1] when it is one char, char[2] when it's not, or
just char[] for all cases.


-- 




More information about the Digitalmars-d-bugs mailing list