is the passed string quoted?
| 3097 | |
| 3098 | // is the passed string quoted? |
| 3099 | bool isQuoted(const std::string& str) { |
| 3100 | if (str.length() < 2) |
| 3101 | return false; // #nocov |
| 3102 | char quote = *(str.begin()); |
| 3103 | return (quote == '\'' || quote == '\"') && (*(str.rbegin()) == quote); |
| 3104 | } |
| 3105 | |
| 3106 | // does a string end with another string? |
| 3107 | bool endsWith(const std::string& str, const std::string& suffix) |
no test coverage detected