Re: bringToFront() and arrays of char

2012-12-13 Thread Jonathan M Davis
On Friday, December 14, 2012 00:27:39 Dmitry Olshansky wrote: > 12/13/2012 7:22 AM, Jonathan M Davis пишет: > > On Wednesday, December 12, 2012 17:34:53 Ali Çehreli wrote: > >> (There must be an easier way of doing that. :)) > > > > If you have a string that's really ASCII and you're _sure_ that i

Re: bringToFront() and arrays of char

2012-12-13 Thread Dmitry Olshansky
12/13/2012 7:22 AM, Jonathan M Davis пишет: On Wednesday, December 12, 2012 17:34:53 Ali Çehreli wrote: (There must be an easier way of doing that. :)) If you have a string that's really ASCII and you're _sure_ that it's only ASCII, then I'd suggest simply casting it to immutable(ubyte)[] and

Re: bringToFront() and arrays of char

2012-12-13 Thread Ali Çehreli
On 12/12/2012 07:22 PM, Jonathan M Davis wrote: > On Wednesday, December 12, 2012 17:34:53 Ali Çehreli wrote: >> (There must be an easier way of doing that. :)) > > If you have a string that's really ASCII and you're _sure_ that it's only > ASCII, then I'd suggest simply casting it to immutable(ub

Re: bringToFront() and arrays of char

2012-12-12 Thread Jonathan M Davis
On Wednesday, December 12, 2012 17:34:53 Ali Çehreli wrote: > (There must be an easier way of doing that. :)) If you have a string that's really ASCII and you're _sure_ that it's only ASCII, then I'd suggest simply casting it to immutable(ubyte)[] and operating on that with all range based funct

Re: bringToFront() and arrays of char

2012-12-12 Thread Ali Çehreli
On 12/12/2012 05:18 PM, Mu wrote: > Why doesn't the below code compile? > How to rewrite it so that it does? > Using: DMD64 D Compiler v2.060. > Thank you. > > Code: > > > import std.algorithm, std.ascii, std.stdio; > > void main() > { > char[] rot13 = lowercase.dup; > > bringToFr

bringToFront() and arrays of char

2012-12-12 Thread Mu
Why doesn't the below code compile? How to rewrite it so that it does? Using: DMD64 D Compiler v2.060. Thank you. Code: import std.algorithm, std.ascii, std.stdio; void main() { char[] rot13 = lowercase.dup; bringToFront(rot13[0 .. 13], rot13[13 .. $]); write