UIntFix.as

T as(T)() if (is(T == string) || isIntegral!T) const @safe pure

Converts the value to T — the as!T idiom of ddn.var and ddn.util.docopt (a member template, written value.as!T).

as!string is the decimal text (the same as toString()). Every integral target — ulong, long, uint, int and the narrower widths — is range-checked exactly like std.conv.to: a value that does not fit throws ConvOverflowException. The checked, non-throwing forms for the @nogc arithmetic subset are fitsUlong and toUlong.

Parameters

Tstring or an integral type

Returns

the value as T.

Throws

ConvOverflowException when an integral target is too

narrow.