/// @file /// @brief Helpers for dealing with `agstrcanon` #pragma once #include #include #include /// how many bytes are needed to canonicalize the given string static inline size_t agstrcanon_bytes(const char *str) { return 2 * strlen(str) + 2; } /// get a buffer suitable for passing into `agstrcanon` static inline char *agstrcanon_buffer(const char *str) { return gv_alloc(agstrcanon_bytes(str)); }