Checks if a string contains a given suffix * * @param[in] str Input string * @param[in] suffix Suffix to check for * * @return True if the string ends with the given suffix else false */
| 183 | * @return True if the string ends with the given suffix else false |
| 184 | */ |
| 185 | inline bool endswith(const std::string &str, const std::string &suffix) |
| 186 | { |
| 187 | if (str.size() < suffix.size()) |
| 188 | { |
| 189 | return false; |
| 190 | } |
| 191 | return std::equal(suffix.rbegin(), suffix.rend(), str.rbegin()); |
| 192 | } |
| 193 | |
| 194 | /** Checks if a pointer complies with a given alignment |
| 195 | * |
no test coverage detected