Does something to dequote (unquote? or what would you call it?) a string exist in the standard library? I didn't see one in std.string, just wondering before reinventing the wheel.

Something like:
```d
assert(dequote(`"foo"`) == "foo");
assert(dequote(`'foo'`) == "foo");
assert(dequote(`"foo's"`) == "foo's");
assert(dequote(`'foo "bar"'`) == `foo "bar"`);
assert(dequote(`"fo\"o"`) == `fo"o`);
dequote(`"fo"o"`); // bad quoting, maybe throw an exception here or something?
```

Reply via email to