#ifndef DBC_TEXT_UTILS_H #define DBC_TEXT_UTILS_H #include #include namespace dbc_detail { inline std::string TrimText(const std::string &text) { std::string::size_type begin = 0U; while ((begin < text.size()) && std::isspace(static_cast(text[begin]))) ++begin; std::string::size_type end = text.size(); while ((end > begin) && std::isspace(static_cast(text[end - 1U]))) --end; return text.substr(begin, end - begin); } } #endif