MCPcopy Create free account
hub / github.com/ValveSoftware/openvr / asCString

Method asCString

src/jsoncpp.cpp:3043–3051  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3041bool Value::operator!=(const Value& other) const { return !(*this == other); }
3042
3043const char* Value::asCString() const {
3044 JSON_ASSERT_MESSAGE(type_ == stringValue,
3045 "in Json::Value::asCString(): requires stringValue");
3046 if (value_.string_ == 0) return 0;
3047 unsigned this_len;
3048 char const* this_str;
3049 decodePrefixedString(this->allocated_, this->value_.string_, &this_len, &this_str);
3050 return this_str;
3051}
3052
3053bool Value::getString(char const** str, char const** cend) const {
3054 if (type_ != stringValue) return false;

Callers

nothing calls this directly

Calls 1

decodePrefixedStringFunction · 0.85

Tested by

no test coverage detected