sdlStrtoll function

int sdlStrtoll(
  1. String? str,
  2. Pointer<Pointer<Int8>> endp,
  3. int base
)
extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *str, char **endp, int base)

Implementation

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