| 199 | } |
| 200 | |
| 201 | bool IsValidSingleQuotedScalar(const std::string& str, bool escapeNonAscii) { |
| 202 | // TODO: check for non-printable characters? |
| 203 | return std::none_of(str.begin(), str.end(), [=](char ch) { |
| 204 | return (escapeNonAscii && (0x80 <= static_cast<unsigned char>(ch))) || |
| 205 | (ch == '\n'); |
| 206 | }); |
| 207 | } |
| 208 | |
| 209 | bool IsValidLiteralScalar(const std::string& str, FlowType::value flowType, |
| 210 | bool escapeNonAscii) { |
no test coverage detected