MCPcopy Create free account
hub / github.com/DFHack/dfhack / strnlen

Function strnlen

library/LuaTypes.cpp:54–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52#ifdef _DARWIN
53#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_6
54size_t strnlen (const char *str, size_t max)
55{
56 const char *end = (const char*)memchr(str, 0, max);
57 return end ? (size_t)(end - str) : max;
58}
59#endif
60#endif
61

Callers 1

read_fieldFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected