What's left for 1.0? - string class

Aarti_pl aarti at interia.pl
Fri Nov 17 07:46:17 PST 2006


Anders F Björklund napisał(a):
> Aarti_pl wrote:
> 
>> from my point of view currently char is just an "alias" for ubyte, and 
>> could/should be removed because it is superfluous. 
> 
> char and wchar are nothing special, but char[] and wchar[] are magic.
> If those used ubyte[] and ushort[], code point looping wouldn't work.
> 
> --anders

so it works now? on dmd 0.172 it exits with:
Error: invalid UTF8 sequence

------------
import std.stdio;

void main() {
	char[] text="Łóżko";
	foreach(c; text) {
		writefln(c);
	}
}

--------------


With string class (e.g. dstring) it could work and some of magic could 
be removed from compiler :-). But now running this program is just 
disaster :-< It doesn't seem that char is in any way different from ubyte...

BR
Marcin Kuszczak



More information about the Digitalmars-d mailing list