aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/lib.c b/lib/lib.c
index d11c600e..ceb1bc7d 100644
--- a/lib/lib.c
+++ b/lib/lib.c
@@ -393,6 +393,8 @@ int unescape(char c)
return (idx == -1) ? 0 : to[idx];
}
+// If string ends with suffix return pointer to start of suffix in string,
+// else NULL
char *strend(char *str, char *suffix)
{
long a = strlen(str), b = strlen(suffix);