MCPcopy Create free account
hub / github.com/bytedance/terarkdb / UnescapeOptionString

Function UnescapeOptionString

util/string_util.cc:238–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236}
237
238std::string UnescapeOptionString(const std::string& escaped_string) {
239 bool escaped = false;
240 std::string output;
241
242 for (auto c : escaped_string) {
243 if (escaped) {
244 output += UnescapeChar(c);
245 escaped = false;
246 } else {
247 if (c == '\\') {
248 escaped = true;
249 continue;
250 }
251 output += c;
252 }
253 }
254 return output;
255}
256
257std::string trim(const std::string& str) {
258 if (str.empty()) return std::string();

Callers 7

ParsePlainTableOptionsFunction · 0.85
ParseSectionMethod · 0.85
ParseColumnFamilyOptionFunction · 0.85
ParseDBOptionFunction · 0.85
TEST_FFunction · 0.85

Calls 1

UnescapeCharFunction · 0.85

Tested by 1

TEST_FFunction · 0.68