From: Christopher Faulet Date: Thu, 22 Oct 2020 12:37:12 +0000 (+0200) Subject: MINOR: ist: Add istend() function to return a pointer to the end of the string X-Git-Tag: v2.4-dev1~107 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cf26623780bdd66f4fff4154d0e5081082aff89b;p=thirdparty%2Fhaproxy.git MINOR: ist: Add istend() function to return a pointer to the end of the string istend() is a shortcut to istptr() + istlen(). --- diff --git a/include/import/ist.h b/include/import/ist.h index 4c8979b423..1262e8f599 100644 --- a/include/import/ist.h +++ b/include/import/ist.h @@ -222,6 +222,12 @@ static inline size_t istlen(const struct ist ist) return ist.len; } +/* returns the pointer to the end the string */ +static inline char *istend(const struct ist ist) +{ + return (ist.ptr + ist.len); +} + /* skips to next character in the string, always stops at the end */ static inline struct ist istnext(const struct ist ist) {