MCPcopy Create free account
hub / github.com/davisking/dlib / add_entity_ref

Function add_entity_ref

tools/htmlify/to_xml.cpp:1369–1384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1367// ----------------------------------------------------------------------------------------
1368
1369string add_entity_ref (const string& str)
1370{
1371 string temp;
1372 for (unsigned long i = 0; i < str.size(); ++i)
1373 {
1374 if (str[i] == '&')
1375 temp += "&amp;";
1376 else if (str[i] == '<')
1377 temp += "&lt;";
1378 else if (str[i] == '>')
1379 temp += "&gt;";
1380 else
1381 temp += str[i];
1382 }
1383 return temp;
1384}
1385
1386// ----------------------------------------------------------------------------------------
1387

Callers 1

write_as_xmlFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected