Text editing [Was: Re: #line decoder]

Sergey Gromov snake.scaly at gmail.com
Sun Sep 28 15:31:59 PDT 2008


Sun, 28 Sep 2008 16:38:33 -0400,
bearophile wrote:
> Real copy of the slice:
> int[] s = a[2 .. 5];
> 
> Light copy, by reference only, some possible alternative syntax:
> int[] s = a[2 .. 5].light;
> int[] s = a[[2 .. 5]];
> int[] s = a[2 .. 5].undup;
> int[] s = a[|2 .. 5|];
> int[] s = a[{2 .. 5}];
> int[] s = a{2 .. 5};
> int[] s = a[(2 .. 5)];

Unfortunately this doesn't address the issue I've faced: readLine 
returns a slice of an internal buffer and there's no way to notice that 
except by RTFM or debugging.


More information about the Digitalmars-d-announce mailing list