decodeFront

version(D_Exceptions)
@safe pure @nogc @property
dchar
decodeFront
(
scope ref inout(char)[] str
)

Examples

string str = "Hello, World!";

assert(str.decodeFront == 'H' && str == "ello, World!");
str = "å";
assert(str.decodeFront == 'å' && str.length == 0);
str = "å";

Meta