isUnicode

Valid Unicode (UTF-8, UTF-16 or UTF-32) constraint

@safe
@constraint
struct isUnicode {}

Members

Functions

check
bool check(T s)
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

errorMessage
string errorMessage;
Undocumented in source.

Examples

assert(test!isUnicode("abcdefghijklmnopqrstuvwxyz"));
assert(test!isUnicode("ABCDEFGHIUJKLMNOPQRSTUVXYZ"));
assert(test!isUnicode("1234567890"));
assert(test!isUnicode("Öl, Müll, Spaß"));
assert(!test!isUnicode("\xFF"));
assert(!test!isUnicode("\xF8\xA1\xA1\xA1\xA1"));

Meta