| 51 | } |
| 52 | |
| 53 | static bool BeginWithString(const std::string &color, |
| 54 | const std::string &compareStr) { |
| 55 | if (color.empty() || compareStr.empty()) { |
| 56 | return false; |
| 57 | } |
| 58 | if (color.length() < compareStr.length()) { |
| 59 | return false; |
| 60 | } |
| 61 | if (color.compare(0, compareStr.length(), compareStr) == 0) { |
| 62 | return true; |
| 63 | } |
| 64 | return false; |
| 65 | } |
| 66 | |
| 67 | static std::string Trim(const std::string &str, const char *whitespace = nullptr, bool trimStart = true, bool trimEnd = true) { |
| 68 | if(str.empty()) { |