[Issue 8730] New: writeln stops on a nul character, even if passed a D string
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Sep 26 13:11:18 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8730
Summary: writeln stops on a nul character, even if passed a D
string
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: destructionator at gmail.com
--- Comment #0 from Adam D. Ruppe <destructionator at gmail.com> 2012-09-26 13:12:00 PDT ---
import std.stdio;
void main() {
writeln("test\0gone");
}
only prints "test". writefln("%s") prints the whole thing.
$ ./test | xxd
0000000: 7465 7374 0a
as you can see the data is indeed not being printed; it isn't just invisible on
my screen.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list