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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/strlib.h b/src/common/strlib.h
index fd24b4b24..4df5a51d2 100644
--- a/src/common/strlib.h
+++ b/src/common/strlib.h
@@ -37,6 +37,10 @@ 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);
+/// Returns the line of the target position in the string.
+/// Lines start at 1.
+int strline(const char* str, size_t pos);
+
/// StringBuf - dynamic string
struct StringBuf
{