MCPcopy Create free account
hub / github.com/Kitware/CMake / cmRemoveQuotes

Function cmRemoveQuotes

Source/cmStringAlgorithms.cxx:62–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62std::string cmRemoveQuotes(cm::string_view str)
63{
64 // We process only strings that have two quotes at least.
65 // Also front() and back() are only defined behavior on non empty strings.
66 if (str.size() >= 2 && //
67 str.front() == '"' && //
68 str.back() == '"') {
69 // Remove a quote from the front and back
70 str.remove_prefix(1);
71 str.remove_suffix(1);
72 }
73 return std::string(str);
74}
75
76std::string cmEscapeQuotes(cm::string_view str)
77{

Callers 3

testStringAlgorithmsFunction · 0.85
LLVMFuzzerTestOneInputFunction · 0.85
ProcessFilesMethod · 0.85

Calls 3

sizeMethod · 0.45
frontMethod · 0.45
backMethod · 0.45

Tested by 1

testStringAlgorithmsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…