Check if the string ends with given suffix. @li **(1)** returns `true` if the string ends with `s`. @li **(2)** returns `true` if the string ends with the character `ch`. @par Complexity @li **(1)** linear in `s`. @li **(2)** constant. @par Exception Safety No-throw guarantee. @param s The string to check for. @{ */
| 1451 | @{ |
| 1452 | */ |
| 1453 | bool |
| 1454 | ends_with(string_view s) const noexcept |
| 1455 | { |
| 1456 | return size() >= s.size() && |
| 1457 | subview(size() - s.size()) == s; |
| 1458 | } |
| 1459 | |
| 1460 | /** Overload |
| 1461 | @param ch The character to check for. |
no test coverage detected