MCPcopy Create free account
hub / github.com/Tencent/rapidjson / WriteEscapedAttributeValue

Method WriteEscapedAttributeValue

example/jsonx/jsonx.cpp:106–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104 }
105
106 bool WriteEscapedAttributeValue(const char* s, size_t length) {
107 for (size_t i = 0; i < length; i++) {
108 switch (s[i]) {
109 case '&': WriteString("&amp;"); break;
110 case '<': WriteString("&lt;"); break;
111 case '"': WriteString("&quot;"); break;
112 default: os_.Put(s[i]); break;
113 }
114 }
115 return true;
116 }
117
118 bool WriteEscapedText(const char* s, size_t length) {
119 for (size_t i = 0; i < length; i++) {

Callers

nothing calls this directly

Calls 1

PutMethod · 0.45

Tested by

no test coverage detected