* @brief Returns @c true if @a str is composed solely of chars in @a chars, @c * false otherwise. * * If @a chars is the empty string, it returns @c false. */
| 730 | * If @a chars is the empty string, it returns @c false. |
| 731 | */ |
| 732 | bool isComposedOnlyOfChars(const std::string &str, const std::string &chars) { |
| 733 | return str.find_first_not_of(chars) == std::string::npos; |
| 734 | } |
| 735 | |
| 736 | /** |
| 737 | * @brief Returns @c true if @a str is composed solely of char @a c, @c false |
no outgoing calls