RCString.by

struct RCString
@trusted
by
(
T
)
()
if (
is(T == char) ||
is(T == wchar)
||
is(T == dchar)
)

Examples

import std.algorithm.comparison : equal;
import std.utf : byChar, byWchar;
auto hello = RCString("你好");
assert(hello.by!char.equal("你好".byChar));
assert(hello.by!wchar.equal("你好".byWchar));
assert(hello.by!dchar.equal("你好"));

Meta