isNumeric

Checks if a string contains only numeric characters.

static pure @nogc
bool
isNumeric
(
string str
,
uint base = 10
)

Parameters

str string

The string to check.

base uint

The numeric base to consider when checking for numericity.

Return Value

Type: bool

true if the string contains only numeric characters.

Meta