sdlStrtoul function

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

Implementation

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