MINOR: ist: add ist0() to add a trailing zero to a string.
authorWilly Tarreau <w@1wt.eu>
Thu, 19 Oct 2017 04:28:23 +0000 (06:28 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 19 Oct 2017 13:01:08 +0000 (15:01 +0200)
commite67c4e5744edfe865137f9699a3bd4be368b5b6f
tree9e7315e63a96ed66585999a095a94cc1bfb82c20
parent41ab86898e4e14b61fd2e1a35effdff9ab4fb4a2
MINOR: ist: add ist0() to add a trailing zero to a string.

This function modifies the string to add a zero after the end, and returns
the start pointer. The purpose is to use it on strings extracted by parsers
from larger strings cut with delimiters that are not important and can be
destroyed. It allows any such string to be used with regular string
functions. It's also convenient to use with printf() to show data extracted
from writable areas.
include/common/ist.h