summaryrefslogtreecommitdiff
path: root/src/common/strlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/strlib.h')
-rw-r--r--src/common/strlib.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/strlib.h b/src/common/strlib.h
index ee473f466..fd24b4b24 100644
--- a/src/common/strlib.h
+++ b/src/common/strlib.h
@@ -34,6 +34,9 @@ int config_switch(const char* str);
/// always nul-terminates the string
char* safestrncpy(char* dst, const char* src, size_t n);
+/// doesn't crash on null pointer
+size_t safestrnlen(const char* string, size_t maxlen);
+
/// StringBuf - dynamic string
struct StringBuf
{