28 #include "utils/string_utils.h" 38 template<
size_t max_length>
47 strncpy(_s, s.c_str(),
48 (s.size() < max_length) ? s.size() : max_length);
55 strncpy(_s, s, max_length);
62 strncpy(_s, s, std::min(len, max_length));
68 operator std::string()
const {
69 return std::string{_s, utils::strnlen_s(_s, max_length)
78 stream.write(izs._s, utils::strnlen_s(izs._s, max_length));
friend std::ostream & operator<<(std::ostream &stream, const inline_zstring &izs)
Definition: inline_zstring.h:76
Definition: inline_zstring.h:39
inline_zstring(const std::string &s)
Definition: inline_zstring.h:46
inline_zstring(const char *s, size_t len)
Definition: inline_zstring.h:61
inline_zstring(const char *s)
Definition: inline_zstring.h:54
Definition: category_registry.h:32