* @brief Retruns @c true if @a str ends with the suffix @a withWhat, @c false * otherwise */
| 667 | * otherwise |
| 668 | */ |
| 669 | bool endsWith(const std::string &str, const std::string &withWhat) { |
| 670 | return (str.length() >= withWhat.length()) && |
| 671 | (str.compare(str.length() - withWhat.length(), withWhat.length(), withWhat) == 0); |
| 672 | } |
| 673 | |
| 674 | /** |
| 675 | * @brief Retruns @c true if @a str ends with the suffix @a withWhat, @c false |