Re: std.uni, std.ascii, std.encoding, std.utf ugh!

2020-05-06 Thread WebFreak001 via Digitalmars-d-learn
On Wednesday, 6 May 2020 at 10:57:59 UTC, learner wrote: On Tuesday, 5 May 2020 at 19:24:41 UTC, WebFreak001 wrote: On Tuesday, 5 May 2020 at 18:41:50 UTC, learner wrote: Good morning, Trying to do this: ``` bool foo(string s) nothrow { return s.all!isDigit; } ``` I realised that the

Re: std.uni, std.ascii, std.encoding, std.utf ugh!

2020-05-06 Thread learner via Digitalmars-d-learn
On Tuesday, 5 May 2020 at 19:24:41 UTC, WebFreak001 wrote: On Tuesday, 5 May 2020 at 18:41:50 UTC, learner wrote: Good morning, Trying to do this: ``` bool foo(string s) nothrow { return s.all!isDigit; } ``` I realised that the conversion from char to dchar could throw. I need to validate

Re: std.uni, std.ascii, std.encoding, std.utf ugh!

2020-05-05 Thread WebFreak001 via Digitalmars-d-learn
On Tuesday, 5 May 2020 at 18:41:50 UTC, learner wrote: Good morning, Trying to do this: ``` bool foo(string s) nothrow { return s.all!isDigit; } ``` I realised that the conversion from char to dchar could throw. I need to validate and operate over ascii strings and utf8 strings, possibly in

std.uni, std.ascii, std.encoding, std.utf ugh!

2020-05-05 Thread learner via Digitalmars-d-learn
Good morning, Trying to do this: ``` bool foo(string s) nothrow { return s.all!isDigit; } ``` I realised that the conversion from char to dchar could throw. I need to validate and operate over ascii strings and utf8 strings, possibly in separate functions, what's the best way to transition