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

Function String

Source/cmJSONHelpers.h:209–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207 };
208
209 static cmJSONHelper<std::string> String(
210 JsonErrors::ErrorGenerator const& error = JsonErrors::INVALID_STRING,
211 std::string const& defval = "")
212 {
213 return [error, defval](std::string& out, Json::Value const* value,
214 cmJSONState* state) -> bool {
215 if (!value) {
216 out = defval;
217 return true;
218 }
219 if (!value->isString()) {
220 error(value, state);
221 return false;
222 }
223 out = value->asString();
224 return true;
225 };
226 };
227
228 static cmJSONHelper<std::string> String(std::string const& defval)
229 {

Callers 15

testConstructFromViewFunction · 0.85
testOperatorPlusEqualFunction · 0.85
testOperatorStreamFunction · 0.85
testMethod_replaceFunction · 0.85
testMethod_compareFunction · 0.85
testMethod_findFunction · 0.85
testMethod_rfindFunction · 0.85

Calls 3

errorFunction · 0.85
isStringMethod · 0.80
asStringMethod · 0.80

Tested by 15

testConstructFromViewFunction · 0.68
testOperatorPlusEqualFunction · 0.68
testOperatorStreamFunction · 0.68
testMethod_replaceFunction · 0.68
testMethod_compareFunction · 0.68
testMethod_findFunction · 0.68
testMethod_rfindFunction · 0.68
testMethod_find_first_ofFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…