to_integral

Converts the given string slice to an integral value.

@nogc nothrow
T
to_integral
(
T
)
(
inout(char)[] str
,
int base = 10
)
if (
__traits(isIntegral, T)
)

Parameters

str inout(char)[]

The string to convert.

base int

The base to read the string as.

Return Value

Type: T

The integral value on success, or 0 on failure.

Meta