July 12, 2017 Anything like quote? | ||||
---|---|---|---|---|
| ||||
I want to create a string while making sure it qualifies as an identifier. Like this: struct quote { static @property string opDispatch(string str)() { return str; } } unittest { assert(quote.foo == "foo"); } Does it already exist somewhere in the language or the library? J-L |
Copyright © 1999-2021 by the D Language Foundation