sdlStrcasestr function
extern DECLSPEC char *SDLCALL SDL_strcasestr(const char *haystack, const char *needle)
Implementation
Pointer<Int8> sdlStrcasestr(String? haystack, String? needle) {
final sdlStrcasestrLookupFunction = libSdl2.lookupFunction<
Pointer<Int8> Function(Pointer<Utf8> haystack, Pointer<Utf8> needle),
Pointer<Int8> Function(
Pointer<Utf8> haystack, Pointer<Utf8> needle)>('SDL_strcasestr');
final haystackPointer = haystack != null ? haystack.toNativeUtf8() : nullptr;
final needlePointer = needle != null ? needle.toNativeUtf8() : nullptr;
final result = sdlStrcasestrLookupFunction(haystackPointer, needlePointer);
calloc.free(haystackPointer);
calloc.free(needlePointer);
return result;
}