Function SDL_atoi

pub unsafe extern "C" fn SDL_atoi(str: *const i8) -> i32
Available on crate feature dep_sdl3 only.
Expand description

Parse an int from a string.

The result of calling SDL_atoi(str) is equivalent to (int)SDL_strtol(str, NULL, 10).

§Parameters

  • str: The null-terminated string to read. Must not be NULL.

§Return value

Returns the parsed int.

§Thread safety

It is safe to call this function from any thread.

§Availability

This function is available since SDL 3.2.0.

§See also