| 70 | } |
| 71 | |
| 72 | bool EndsWith(const std::string& full_string, const std::string& end) { |
| 73 | if (full_string.size() >= end.size()) { |
| 74 | return (full_string.compare(full_string.size() - end.size(), end.size(), |
| 75 | end) == 0); |
| 76 | } |
| 77 | return false; |
| 78 | } |
| 79 | |
| 80 | std::vector<std::string_view> SplitLines(std::string_view text) { |
| 81 | std::vector<std::string_view> lines; |