summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/common-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/common-utils.c')
-rw-r--r--libglusterfs/src/common-utils.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
index f3386fe2b62..022fdf35537 100644
--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -1548,3 +1548,16 @@ out:
return ret;
}
+
+char *
+strtail (char *str, const char *pattern)
+{
+ int i = 0;
+
+ for (i = 0; str[i] == pattern[i] && str[i]; i++);
+
+ if (pattern[i] == '\0')
+ return str + i;
+
+ return NULL;
+}