isWideString

Determines whether T is a wide string, i.e. consists of $(D_KEYWORD dchar).

The character type of the string can be qualified with $(D_KEYWORD const), $(D_KEYWORD immutable) or $(D_KEYWORD inout), but an occurrence of $(D_KEYWORD shared) in the character type results in returning $(D_KEYWORD false). The string itself (in contrast to its character type) can have any type qualifiers.

Static $(D_KEYWORD char) and $(D_KEYWORD wchar) arrays are not considered strings.

enum bool isWideString(T);

Return Value

$(D_KEYWORD true) if T is a wide string, $(D_KEYWORD false) otherwise.

Examples

static assert(isWideString!(dchar[]));
static assert(!isWideString!(char[]));
static assert(!isWideString!(wchar[]));

static assert(isWideString!dstring);
static assert(!isWideString!string);
static assert(!isWideString!wstring);

static assert(isWideString!(const dstring));
static assert(!isWideString!(const string));
static assert(!isWideString!(const wstring));

static assert(isWideString!(shared dstring));
static assert(!isWideString!(shared string));
static assert(!isWideString!(shared wstring));

static assert(isWideString!(const(dchar)[]));
static assert(isWideString!(inout(dchar)[]));
static assert(!isWideString!(shared(const(dchar))[]));
static assert(!isWideString!(shared(dchar)[]));
static assert(!isWideString!(dchar[10]));

See Also

$(D_PSYMBOL isNarrowString).

Meta