| 3777 | bool Value::isValidIndex(ArrayIndex index) const { return index < size(); } |
| 3778 | |
| 3779 | Value const *Value::find(char const *begin, char const *end) const |
| 3780 | { |
| 3781 | JSON_ASSERT_MESSAGE(type() == nullValue || type() == objectValue, |
| 3782 | "in Json::Value::find(begin, end): requires " |
| 3783 | "objectValue or nullValue"); |
| 3784 | if (type() == nullValue) |
| 3785 | return nullptr; |
| 3786 | CZString actualKey(begin, static_cast<unsigned>(end - begin), CZString::noDuplication); |
| 3787 | ObjectValues::const_iterator it = value_.map_->find(actualKey); |
| 3788 | if (it == value_.map_->end()) |
| 3789 | return nullptr; |
| 3790 | return &(*it).second; |
| 3791 | } |
| 3792 | Value *Value::demand(char const *begin, char const *end) |
| 3793 | { |
| 3794 | JSON_ASSERT_MESSAGE(type() == nullValue || type() == objectValue, |