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

Method htmlify

dlib/cpp_pretty_printer/cpp_pretty_printer_kernel_1.h:577–596  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

575 typename tok
576 >
577 const std::string cpp_pretty_printer_kernel_1<stack,tok>::
578 htmlify (
579 const std::string& str
580 ) const
581 {
582 std::string::size_type i;
583 std::string temp;
584 for (i = 0; i < str.size(); ++i)
585 {
586 if (str[i] == '<')
587 temp += "&lt;";
588 else if (str[i] == '>')
589 temp += "&gt;";
590 else if (str[i] == '&')
591 temp += "&amp;";
592 else
593 temp += str[i];
594 }
595 return temp;
596 }
597
598// ----------------------------------------------------------------------------------------
599

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected