| 1080 | bool Value::isValidIndex(ArrayIndex index) const { return index < size(); } |
| 1081 | |
| 1082 | Value const* Value::find(char const* begin, char const* end) const { |
| 1083 | JSON_ASSERT_MESSAGE(type() == nullValue || type() == objectValue, |
| 1084 | "in Json::Value::find(begin, end): requires " |
| 1085 | "objectValue or nullValue"); |
| 1086 | if (type() == nullValue) |
| 1087 | return nullptr; |
| 1088 | CZString actualKey(begin, static_cast<unsigned>(end - begin), |
| 1089 | CZString::noDuplication); |
| 1090 | ObjectValues::const_iterator it = value_.map_->find(actualKey); |
| 1091 | if (it == value_.map_->end()) |
| 1092 | return nullptr; |
| 1093 | return &(*it).second; |
| 1094 | } |
| 1095 | Value const* Value::find(const String& key) const { |
| 1096 | return find(key.data(), key.data() + key.length()); |
| 1097 | } |
no test coverage detected