www.digitalmars.com         C & C++   DMDScript  

D.gnu - phobos ctype and dchar

in phobos:

for instance
int isxdigit(dchar c)	{ return _ctype[1 + c] & (_HEX); }

_ctype is: "ubyte _ctype[257]"

but dchar is a unsigned 32 bit UTF-32
which can hold a value > 256

do we want it to be like this?

if phobos is compiled with -debug instead of -version
an ArrayBoundsError error will end the application.

Apr 18 2004