On Thursday, 30 January 2025 at 01:38:07 UTC, Kyle Ingraham wrote:
Does D have a 'try' `std.conv:to` that does not throw if it
fails?
Have you looked at
[mir.conv](http://mir-core.libmir.org/mir_conv.html) and
[mir.parse](http://mir-algorithm.libmir.org/mir_parse.html)?
On Thursday, 30 January 2025 at 01:38:07 UTC, Kyle Ingraham wrote:
Does D have a 'try' `std.conv:to` that does not throw if it
fails? Something like:
```D
string input = "9";
int output;
auto parsed = input.tryTo!int(output);
```
You could try something like this:
```d
import std.typecons: Nu