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

Method asCString

vrclient_x64/jsoncpp.cpp:3042–3050  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

decodePrefixedStringFunction · 0.85

Tested by

no test coverage detected