diff --git a/src/lib/util/misc.h b/src/lib/util/misc.h index 10fad0b342d6..92084da65099 100644 --- a/src/lib/util/misc.h +++ b/src/lib/util/misc.h @@ -68,6 +68,13 @@ void fr_talloc_verify_cb(const void *ptr, int depth, */ #define fr_skip_whitespace(_p) while(isspace((int)*(_p))) _p++ +/** Skip whitespace, stopping at end ('\\t', '\\n', '\\v', '\\f', '\\r', ' ') + * + * @param[in,out] _p string to skip over. + * @param[in] _e pointer to end of string. + */ +#define fr_bskip_whitespace(_p, _e) while((_p < _e) && isspace((int)*(_p))) _p++ + /** Skip everything that's not whitespace ('\\t', '\\n', '\\v', '\\f', '\\r', ' ') * * @param[in,out] _p string to skip over.