#pragma once #include #include #include namespace util { template Type *malloc(size_t size) noexcept { return static_cast(::malloc(size)); } bool str_ends_with(const char *str, const char *other_str) noexcept; /** * Extracts a portion of a string. * * @param str The target string. * @param end A pointer to a place inside the target string. * @param dest Output buffer. */ void substr(const char *str, const char *end, char *dest) noexcept; } // namespace util