MCPcopy Create free account
hub / github.com/apache/trafficserver / IsValidLiteralScalar

Function IsValidLiteralScalar

lib/yamlcpp/src/emitterutils.cpp:209–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209bool IsValidLiteralScalar(const std::string& str, FlowType::value flowType,
210 bool escapeNonAscii) {
211 if (flowType == FlowType::Flow) {
212 return false;
213 }
214
215 // TODO: check for non-printable characters?
216 return std::none_of(str.begin(), str.end(), [=](char ch) {
217 return (escapeNonAscii && (0x80 <= static_cast<unsigned char>(ch)));
218 });
219}
220
221std::pair<uint16_t, uint16_t> EncodeUTF16SurrogatePair(int codePoint) {
222 const uint32_t leadOffset = 0xD800 - (0x10000 >> 10);

Callers 1

ComputeStringFormatFunction · 0.85

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected