digitalmars.D.learn - Anything like quote?
- Jean-Louis Leroy (12/12) Jul 12 2017 I want to create a string while making sure it qualifies as an
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
Jul 12 2017








Jean-Louis Leroy <jl leroy.nyc>