MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / getString

Method getString

Source/JSON/jsoncpp.cpp:2751–2758  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2749}
2750
2751bool Value::getString(char const** str, char const** cend) const {
2752 if (type_ != stringValue) return false;
2753 if (value_.string_ == 0) return false;
2754 unsigned length;
2755 decodePrefixedString(this->allocated_, this->value_.string_, &length, str);
2756 *cend = *str + length;
2757 return true;
2758}
2759
2760std::string Value::asString() const {
2761 switch (type_) {

Callers 1

writeValueMethod · 0.45

Calls 1

decodePrefixedStringFunction · 0.70

Tested by

no test coverage detected