sdlStrtol function

int sdlStrtol(
  1. String? str,
  2. Pointer<Pointer<Int8>> endp,
  3. int base
)
extern DECLSPEC long SDLCALL SDL_strtol(const char *str, char **endp, int base)

Implementation

int sdlStrtol(String? str, Pointer<Pointer<Int8>> endp, int base) {
  final sdlStrtolLookupFunction = libSdl2.lookupFunction<
      Int32 Function(
          Pointer<Utf8> str, Pointer<Pointer<Int8>> endp, Int32 base),
      int Function(Pointer<Utf8> str, Pointer<Pointer<Int8>> endp,
          int base)>('SDL_strtol');
  final strPointer = str != null ? str.toNativeUtf8() : nullptr;
  final result = sdlStrtolLookupFunction(strPointer, endp, base);
  calloc.free(strPointer);
  return result;
}