COW vs. in-place.

Derek derek at psyc.ward
Mon Jul 31 15:14:35 PDT 2006


On Mon, 31 Jul 2006 16:40:54 -0500, Dave wrote:

>Not a bad idea... The main prob. would be that there would be a lot of 
>duplication of code.

void toUpper_inplace(char[] x)
{
 . . .
}

char[] toUpper(char[] x)
{
   char[] y = x.dup;
   toUpper_inplace(y);
   return y;
}

-- 
Derek Parnell
Melbourne, Australia
"Down with mediocrity!"



More information about the Digitalmars-d mailing list