Consider this simple function:

        private string findParameterList(string typestr)
        {
                auto strippedHead = typestr.find("(")[1 .. $];
                auto strippedTail = retro(strippedHead).find(")");

                strippedTail.popFront(); // slice off closing parenthesis

                return array(strippedTail);
        }

The type of the return expression is dstring, not string.

What is the most elegant way or correct way to solve this friction?

(Note: the function is used in CTFE)

Reply via email to