pub unsafe fn q_environment_variable_int_value_1a(
    var_name: *const c_char
) -> c_int
Expand description

Returns the numerical value of the environment variable varName. If ok is not null, sets *ok to true or false depending on the success of the conversion.

Calls C++ function: int qEnvironmentVariableIntValue(const char* varName).

C++ documentation:

Returns the numerical value of the environment variable varName. If ok is not null, sets *ok to true or false depending on the success of the conversion.

Equivalent to

qgetenv(varName).toInt(ok, 0)

except that it's much faster, and can't throw exceptions.

Note: there's a limit on the length of the value, which is sufficient for all valid values of int, not counting leading zeroes or spaces. Values that are too long will either be truncated or this function will set ok to false.

This function was introduced in Qt 5.5.

See also qgetenv() and qEnvironmentVariableIsSet().