[Issue 11231] New: formattedRead accepts silently trailing space past the string to match, but no other character
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Oct 11 20:06:06 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11231
Summary: formattedRead accepts silently trailing space past the
string to match, but no other character
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: thelastmammoth at gmail.com
--- Comment #0 from thelastmammoth at gmail.com 2013-10-11 20:06:02 PDT ---
void main(){
string s = "abc:";
string a;
import std.format;
auto count=formattedRead(s, "%s: ", &a);
//works but should throw exception: Cannot find character ` ' in the input
string
assert(a=="abc");
//NOTE: with any other character it seems to throw the exception, including
"\n" and "\t"
}
--
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