/////////////////////////////////////////////////////////////////////////// Assumes that quotes is a string containing a non-trivial set of quote characters.
| 217 | // Assumes that quotes is a string containing a non-trivial set of quote |
| 218 | // characters. |
| 219 | void Lexer::dequote(std::string& input, const std::string& quotes) { |
| 220 | int quote = input[0]; |
| 221 | if (quotes.find(quote) != std::string::npos) { |
| 222 | size_t len = input.length(); |
| 223 | if (quote == input[len - 1]) input = input.substr(1, len - 2); |
| 224 | } |
| 225 | } |
| 226 | |
| 227 | //////////////////////////////////////////////////////////////////////////////// |
| 228 | // Detects characters in an input string that indicate quotes were required, or |