diff options
Diffstat (limited to 'strbuf.h')
| -rw-r--r-- | strbuf.h | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -660,9 +660,9 @@ char *xstrvfmt(const char *fmt, va_list ap); __attribute__((format (printf, 1, 2))) char *xstrfmt(const char *fmt, ...); -int starts_with(const char *str, const char *prefix); -int istarts_with(const char *str, const char *prefix); -int starts_with_mem(const char *str, size_t len, const char *prefix); +bool starts_with(const char *str, const char *prefix); +bool istarts_with(const char *str, const char *prefix); +bool starts_with_mem(const char *str, size_t len, const char *prefix); /* * If the string "str" is the same as the string in "prefix", then the "arg" @@ -678,16 +678,16 @@ int starts_with_mem(const char *str, size_t len, const char *prefix); * can be used instead of !strcmp(arg, "--key") and then * skip_prefix(arg, "--key=", &arg) to parse such an option. */ -int skip_to_optional_arg_default(const char *str, const char *prefix, +bool skip_to_optional_arg_default(const char *str, const char *prefix, const char **arg, const char *def); -static inline int skip_to_optional_arg(const char *str, const char *prefix, +static inline bool skip_to_optional_arg(const char *str, const char *prefix, const char **arg) { return skip_to_optional_arg_default(str, prefix, arg, ""); } -static inline int ends_with(const char *str, const char *suffix) +static inline bool ends_with(const char *str, const char *suffix) { size_t len; return strip_suffix(str, suffix, &len); |
