X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcommon.h;h=ae8e311f9983e8ff63441c0ab2936d287220ae67;hb=aee87d9c1665ca8823c7489bfc9900ff12e0e177;hp=2c74436318fecee1f9189bbfb6e658e28531d3f1;hpb=7285e5f59ffa4efb391485fe9b35ee02f3dc856f;p=collectd.git diff --git a/src/common.h b/src/common.h index 2c744363..ae8e311f 100644 --- a/src/common.h +++ b/src/common.h @@ -208,6 +208,13 @@ int strsubstitute (char *str, char c_from, char c_to); */ int strunescape (char *buf, size_t buf_len); +/** + * Removed trailing newline characters (CR and LF) from buffer, which must be + * null terminated. Returns the length of the resulting string. + */ +__attribute__((nonnull (1))) +size_t strstripnewline (char *buffer); + /* * NAME * timeval_cmp