| 1176 | } |
| 1177 | |
| 1178 | Value const* Value::find(char const* begin, char const* end) const { |
| 1179 | JSON_ASSERT_MESSAGE(type() == nullValue || type() == objectValue, |
| 1180 | "in Json::Value::find(begin, end): requires objectValue or nullValue"); |
| 1181 | if (type() == nullValue) |
| 1182 | return nullptr; |
| 1183 | CZString actualKey(begin, static_cast<unsigned>(end - begin), CZString::noDuplication); |
| 1184 | ObjectValues::const_iterator it = value_.map_->find(actualKey); |
| 1185 | if (it == value_.map_->end()) |
| 1186 | return nullptr; |
| 1187 | return &(*it).second; |
| 1188 | } |
| 1189 | Value const* Value::find(const StringContainer& key) const { |
| 1190 | return find(key.data(), key.data() + key.length()); |
| 1191 | } |
no test coverage detected