MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / SDL_strtoul

Function SDL_strtoul

deps/SDL2/src/stdlib/SDL_string.c:885–908  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

883}
884
885unsigned long
886SDL_strtoul(const char *string, char **endp, int base)
887{
888#if defined(HAVE_STRTOUL)
889 return strtoul(string, endp, base);
890#else
891 size_t len;
892 unsigned long value = 0;
893
894 if (!base) {
895 if ((SDL_strlen(string) > 2) && (SDL_strncmp(string, "0x", 2) == 0)) {
896 base = 16;
897 } else {
898 base = 10;
899 }
900 }
901
902 len = SDL_ScanUnsignedLong(string, base, &value);
903 if (endp) {
904 *endp = (char *) string + len;
905 }
906 return value;
907#endif /* HAVE_STRTOUL */
908}
909
910Sint64
911SDL_strtoll(const char *string, char **endp, int base)

Callers 1

get_capsFunction · 0.85

Calls 3

SDL_strlenFunction · 0.85
SDL_strncmpFunction · 0.85
SDL_ScanUnsignedLongFunction · 0.85

Tested by

no test coverage detected