15 #ifndef CORE_UTIL_STRING_H_
16 #define CORE_UTIL_STRING_H_
25 inline bool EndsWith(
const std::string& str,
const std::string& suffix) {
26 return str.size() >= suffix.size() &&
27 str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0;
30 inline bool StartsWith(
const std::string& str,
const std::string& prefix) {
31 return str.size() >= prefix.size() &&
32 str.compare(0, prefix.size(), prefix) == 0;
35 std::vector<std::string>
Split(
const std::string& s,
36 const std::string& delimiter);
52 template <
typename T,
typename... Args>
54 const Args&... parts) {
69 template <
typename... Args>
70 inline std::string
Concat(
const Args&... parts) {
71 std::ostringstream message;
78 #endif // CORE_UTIL_STRING_H_