October 28, 2004 RFE - trivial utf/char macros | ||||
---|---|---|---|---|
| ||||
Just an addition to the "isValidDchar" function : --- utf.d.orig Wed Sep 29 04:25:49 2004 +++ utf.d Thu Oct 28 00:01:50 2004 @@ -40,6 +40,15 @@ } } +bit isAscii(char c) +{ + return c <= 0x7F; +} + +bit isSurrogate(wchar c) +{ + return (c >= 0xD800 && c <= 0xDFFF); +} bit isValidDchar(dchar c) { Perhaps obvious to all Unicode experts, but anyway... --anders |
Copyright © 1999-2021 by the D Language Foundation