FSF.atoi

Far Manager

atoi

The FSF.atoi function converts a string to a 32-bit integer.
int WINAPI atoi(
  const char *Str
);

Parameters

Str
Points to a string to convert.

Return value

If the function succeeds, return value is the converted value of the input string Str, otherwise it returns 0.

Remarks

The Str string parameter must be in the following form:
[ws][sn][ddd] where
  ws - space or tab characters (ignored)
  sn - sign - '+' or '-'
  ddd - one or more decimal digits - from '0' to '9'
The function stops reading the input string at the first character that it cannot recognize as part of a number. In case of overflow the return value is undefined.

Example

You can define and initialize a function pointer to use it later:
FARSTDATOI FarAtoi;
...
FarAtoi=Info.FSF->atoi;
...
I=FarAtoi(Str);
...or call the function directly:
I=Info.FSF->atoi(Str);
See also: