[Issue 4608] std.string.chomp documentation mismatch implementation
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Feb 5 21:18:14 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=4608
Yao Gomez <yao.gomez at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |yao.gomez at gmail.com
--- Comment #1 from Yao Gomez <yao.gomez at gmail.com> 2012-02-05 21:18:12 PST ---
DMD 2.058HEAD. With this example, all the assertions fail.
------
import std.string, std.stdio, std.conv;
void main()
{
auto foo = "foobar\n\r\n\n";
auto baz = chomp(foo);
auto bar = chomp(foo, "");
auto soz = chomp(foo, "\n\r");
assert( baz == "foobar");
assert( bar == "foobar");
assert( soz == "foobar");
}
------
--
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