X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fstring.h;h=489019ef1694fdb883993ef3eafda49ef7ae4cb0;hb=cab4e4c43f92582a2bfc026137b3d8a175bd0360;hp=3c877d686375022f9b69773465e8b80eb92ac864;hpb=5412b5399e095730008a14f2107331b2123733e4;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/string.h b/include/linux/string.h index 3c877d68637..489019ef169 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -122,5 +122,14 @@ int bprintf(u32 *bin_buf, size_t size, const char *fmt, ...) __printf(3, 4); extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos, const void *from, size_t available); +/** + * strstarts - does @str start with @prefix? + * @str: string to examine + * @prefix: prefix to look for. + */ +static inline bool strstarts(const char *str, const char *prefix) +{ + return strncmp(str, prefix, strlen(prefix)) == 0; +} #endif #endif /* _LINUX_STRING_H_ */