aboutsummaryrefslogtreecommitdiff
path: root/lib/lib.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2017-06-06 13:21:03 -0500
committerRob Landley <rob@landley.net>2017-06-06 13:21:03 -0500
commite1ee741930349a4daaada29bd6ff4cbc0e313641 (patch)
treeb0395d2469a5b224743d75105f031b3c0e9721cc /lib/lib.c
parentab33097058b05a173113832fcca6b8d6c3b6143d (diff)
downloadtoybox-e1ee741930349a4daaada29bd6ff4cbc0e313641.tar.gz
Add comment explaining strend()
Diffstat (limited to 'lib/lib.c')
-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);