]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - tools/lib/string.c
Merge tag 'sound-4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
[mirror_ubuntu-artful-kernel.git] / tools / lib / string.c
index bd239bc1d557dbde447e8128ac7cd3163dc11a04..8e678af1c6ee479eae333cf5766598db5dce5208 100644 (file)
@@ -87,3 +87,12 @@ size_t __weak strlcpy(char *dest, const char *src, size_t size)
        }
        return ret;
 }
+
+int prefixcmp(const char *str, const char *prefix)
+{
+       for (; ; str++, prefix++)
+               if (!*prefix)
+                       return 0;
+               else if (*str != *prefix)
+                       return (unsigned char)*prefix - (unsigned char)*str;
+}