* @brief Returns @c true if @a str has substring @a withWhat on index * @a position. */
| 701 | * @a position. |
| 702 | */ |
| 703 | bool hasSubstringOnPosition(const std::string &str, |
| 704 | const std::string &withWhat, std::string::size_type position) { |
| 705 | return (position < str.length()) && (str.length() - position >= withWhat.length()) && |
| 706 | (str.compare(position, withWhat.length(), withWhat) == 0); |
| 707 | } |
| 708 | |
| 709 | /** |
| 710 | * @brief Returns @c true if @a str has substring @a withWhat in area |