* Ends string with given suffix? * * @param[in] suffix Suffix * * @return If string ends with suffix, it will return true otherwise false. */
| 441 | * @return If string ends with suffix, it will return true otherwise false. |
| 442 | */ |
| 443 | bool endsWith(const String& suffix) const |
| 444 | { |
| 445 | bool result = false; |
| 446 | |
| 447 | if (suffix.length() <= length()) |
| 448 | { |
| 449 | result = 0 == m_stdStr.compare(length() - suffix.length(), suffix.length(), suffix.m_stdStr); |
| 450 | } |
| 451 | |
| 452 | return result; |
| 453 | } |
| 454 | |
| 455 | private: |
| 456 |
no test coverage detected