MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / ShowCStringQuoted

Method ShowCStringQuoted

rtpose_wrapper/src/gtest/gtest-all.cpp:2130–2132  ·  view source on GitHub ↗

Returns the input enclosed in double quotes if it's not NULL; otherwise returns "(null)". For example, "\"Hello\"" is returned for input "Hello". This is useful for printing a C string in the syntax of a literal. Known issue: escape sequences are not handled yet.

Source from the content-addressed store, hash-verified

2128//
2129// Known issue: escape sequences are not handled yet.
2130String String::ShowCStringQuoted(const char* c_str) {
2131 return c_str ? String::Format("\"%s\"", c_str) : String("(null)");
2132}
2133
2134// Copies at most length characters from str into a newly-allocated
2135// piece of memory of size length+1. The memory is allocated with new[].

Callers

nothing calls this directly

Calls 2

FormatClass · 0.85
StringFunction · 0.70

Tested by

no test coverage detected