StringToInt Function

Converts a string to an integer.

int StringToInt(const char[] str, int nBase)

Parameters

const char[] str

String to convert.

int nBase

Numerical base to use. 10 is default.

Return Value

Integer conversion of string, or 0 on failure.