On Wednesday, 4 December 2013 at 23:03:10 UTC, Chris Cain wrote:


Here's a version that does what (I think) you want:

----------
string stripPar(string S)
{
        while(S[0] == '(' && S[S.length-1] == ')')
        {
        
              S = S[1 .. $ - 1];
        }

        return S;
}
----------

So, what this does is just changes the view of S, not the data of S. A subtle but important distinction.

First thank you soooo much for clarification of the operation.

however, i tried your solution too. this failed with the same errors as mentioned in the first post of the thread..

Reply via email to