X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-lib%2Fstr.h;h=4786d2766852c05ab2e4478d4b9e8ecc914efb67;hp=296cd55b7d0ece6b687c9f614e258e46cfb1480e;hb=d23094706c228c63c7c7ab8f337fb5dd886c4109;hpb=cba0e6e5396174e213987bd0d45cc6f25dc78b05 diff --git a/lib-lib/str.h b/lib-lib/str.h index 296cd55..4786d27 100644 --- a/lib-lib/str.h +++ b/lib-lib/str.h @@ -130,6 +130,18 @@ m_strncat(char *dst, ssize_t n, const char *src, ssize_t l) { /* parsing related */ /****************************************************************************/ +static inline const char *m_strchrnul(const char *s, int c) { + while (*s && *s != c) + s++; + return s; +} + +static inline const char *m_strnextsp(const char *s) { + while (*s && !isspace((unsigned char)*s)) + s++; + return s; +} + static inline const char *skipspaces(const char *s) { while (*s && isspace((unsigned char)*s)) s++;