Remove function?

seany seany at uni-bonn.de
Thu Dec 5 07:46:40 PST 2013


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..


More information about the Digitalmars-d-learn mailing list