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

Method asCString

Source/JSON/jsoncpp.cpp:2741–2749  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2739bool Value::operator!=(const Value& other) const { return !(*this == other); }
2740
2741const char* Value::asCString() const {
2742 JSON_ASSERT_MESSAGE(type_ == stringValue,
2743 "in Json::Value::asCString(): requires stringValue");
2744 if (value_.string_ == 0) return 0;
2745 unsigned this_len;
2746 char const* this_str;
2747 decodePrefixedString(this->allocated_, this->value_.string_, &this_len, &this_str);
2748 return this_str;
2749}
2750
2751bool Value::getString(char const** str, char const** cend) const {
2752 if (type_ != stringValue) return false;

Callers

nothing calls this directly

Calls 1

decodePrefixedStringFunction · 0.70

Tested by

no test coverage detected