Re: weird formattedRead

2021-04-09 Thread Ali Çehreli via Digitalmars-d-learn
On 4/9/21 11:17 AM, Berni44 wrote: > I'm on reworking completely the docs of `std.format`. Awesome! :) Ali

Re: weird formattedRead

2021-04-09 Thread Berni44 via Digitalmars-d-learn
On Friday, 9 April 2021 at 16:11:26 UTC, Oleg B wrote: valid '1/1/1': 0001-Jan-01 00:00:00 <<< see here [...] Is space a special char for `formattedRead` and it simple stop parse without throwing exception if not found space (that represented in fmt string)? Have `formattedRead` any other

Re: weird formattedRead

2021-04-09 Thread frame via Digitalmars-d-learn
On Friday, 9 April 2021 at 16:11:26 UTC, Oleg B wrote: Is space a special char for `formattedRead` and it simple stop parse without throwing exception if not found space (that represented in fmt string)? Have `formattedRead` any other special chars? Or it's bug? I think it's a bug: The

Re: weird formattedRead

2021-04-09 Thread Ali Çehreli via Digitalmars-d-learn
On 4/9/21 9:11 AM, Oleg B wrote: > Is space a special char for `formattedRead` and it simple stop parse > without throwing exception if not found space Yes: The space character means "zero or more white space". Ali P.S. I can't check whether the D standard library documentation includes that

weird formattedRead

2021-04-09 Thread Oleg B via Digitalmars-d-learn
Hello, I have some doubts about working `formattedRead` with space chars. Example: ```d import std : formattedRead, DateTime, stderr, each; DateTime parseDT(string str) { int d,mo,y, h,m,s; formattedRead!"%d/%d/%d %d:%d:%d"(str, d,mo,y, h,m,s); return DateTime(y,mo,d, h,m,s); }