| 3518 | bool Value::isValidIndex(ArrayIndex index) const { return index < size(); } |
| 3519 | |
| 3520 | Value const* Value::find(char const* begin, char const* end) const { |
| 3521 | JSON_ASSERT_MESSAGE(type() == nullValue || type() == objectValue, |
| 3522 | "in Json::Value::find(begin, end): requires " |
| 3523 | "objectValue or nullValue"); |
| 3524 | if (type() == nullValue) |
| 3525 | return nullptr; |
| 3526 | CZString actualKey(begin, static_cast<unsigned>(end - begin), |
| 3527 | CZString::noDuplication); |
| 3528 | ObjectValues::const_iterator it = value_.map_->find(actualKey); |
| 3529 | if (it == value_.map_->end()) |
| 3530 | return nullptr; |
| 3531 | return &(*it).second; |
| 3532 | } |
| 3533 | Value const* Value::find(const String& key) const { |
| 3534 | return find(key.data(), key.data() + key.length()); |
| 3535 | } |