X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=include%2Flinux%2Fstring.h;h=651839a2a755ffa63aa862367fb502897df94e3c;hb=ca54cb8c9eb38095dc420b73c6380ce1dbeb10fa;hp=3c877d686375022f9b69773465e8b80eb92ac864;hpb=8302294f43250dc337108c51882a6007f2b1e2e0;p=safe%2Fjmp%2Flinux-2.6 diff --git a/include/linux/string.h b/include/linux/string.h index 3c877d6..651839a 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -62,7 +62,15 @@ extern char * strnchr(const char *, size_t, int); #ifndef __HAVE_ARCH_STRRCHR extern char * strrchr(const char *,int); #endif -extern char * strstrip(char *); +extern char * __must_check skip_spaces(const char *); + +extern char *strim(char *); + +static inline __must_check char *strstrip(char *str) +{ + return strim(str); +} + #ifndef __HAVE_ARCH_STRSTR extern char * strstr(const char *,const char *); #endif @@ -122,5 +130,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_ */