Remove function?

bearophile bearophileHUGS at lycos.com
Wed Dec 4 16:08:25 PST 2013


> C1[] stripPar(C1, C2)(C1[] txt, in C2 open = '(', in C2 
> close=')')
> @safe pure if (isSomeChar!C1 && isSomeChar!C2) {
>     while (txt.front == open && txt.back == close) {
>         txt.popFront;
>         txt.popBack;
>     }
>
>     return txt;
> }

The next improvement step is to make it work on a Range.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list