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

Method htmlify

dlib/cpp_pretty_printer/cpp_pretty_printer_kernel_2.h:500–519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

498 typename tok
499 >
500 const std::string cpp_pretty_printer_kernel_2<stack,tok>::
501 htmlify (
502 const std::string& str
503 ) const
504 {
505 std::string::size_type i;
506 std::string temp;
507 for (i = 0; i < str.size(); ++i)
508 {
509 if (str[i] == '<')
510 temp += "&lt;";
511 else if (str[i] == '>')
512 temp += "&gt;";
513 else if (str[i] == '&')
514 temp += "&amp;";
515 else
516 temp += str[i];
517 }
518 return temp;
519 }
520
521// ----------------------------------------------------------------------------------------
522

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected