www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - 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
Jul 12 2017