diff options
| -rw-r--r-- | include/linux/string.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/string.h b/include/linux/string.h index d18fc198aa2f..76ec218bb30f 100644 --- a/include/linux/string.h +++ b/include/linux/string.h | |||
| @@ -114,5 +114,14 @@ extern bool sysfs_streq(const char *s1, const char *s2); | |||
| 114 | extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos, | 114 | extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos, |
| 115 | const void *from, size_t available); | 115 | const void *from, size_t available); |
| 116 | 116 | ||
| 117 | /** | ||
| 118 | * strstarts - does @str start with @prefix? | ||
| 119 | * @str: string to examine | ||
| 120 | * @prefix: prefix to look for. | ||
| 121 | */ | ||
| 122 | static inline bool strstarts(const char *str, const char *prefix) | ||
| 123 | { | ||
| 124 | return strncmp(str, prefix, strlen(prefix)) == 0; | ||
| 125 | } | ||
| 117 | #endif | 126 | #endif |
| 118 | #endif /* _LINUX_STRING_H_ */ | 127 | #endif /* _LINUX_STRING_H_ */ |
