Lines Matching defs:pos
2959 for (auto pos = s.find(f); // find first occurrence of f
2960 pos != StringType::npos; // make sure f was found
2961 s.replace(pos, f.size(), t), // replace with t, and
2962 pos = s.find(f, pos + t.size())) // find next occurrence of f
4404 @param[in] pos the position where the error occurred (or with
4411 static parse_error create(int id_, const position_t& pos, const std::string& what_arg, BasicJsonContext context)
4414 position_string(pos), ": ", exception::diagnostics(context), what_arg);
4415 return {id_, pos.chars_read_total, w.c_str()};
4442 static std::string position_string(const position_t& pos)
4444 return concat(" at line ", std::to_string(pos.lines_read + 1),
4445 ", column ", std::to_string(pos.chars_read_current_line));
14384 for (std::size_t pos = reference_token.find_first_of('~');
14385 pos != string_t::npos;
14386 pos = reference_token.find_first_of('~', pos + 1))
14388 JSON_ASSERT(reference_token[pos] == '~');
14391 if (JSON_HEDLEY_UNLIKELY(pos == reference_token.size() - 1 ||
14392 (reference_token[pos + 1] != '0' &&
14393 reference_token[pos + 1] != '1')))
19082 iterator erase(iterator pos)
19084 return erase(pos, std::next(pos));
21595 IteratorType erase(IteratorType pos)
21598 if (JSON_HEDLEY_UNLIKELY(this != pos.m_object))
21614 if (JSON_HEDLEY_UNLIKELY(!pos.m_it.primitive_iterator.is_begin()))
21641 result.m_it.object_iterator = m_value.object->erase(pos.m_it.object_iterator);
21647 result.m_it.array_iterator = m_value.array->erase(pos.m_it.array_iterator);
22436 iterator insert_iterator(const_iterator pos, Args&& ... args)
22441 auto insert_pos = std::distance(m_value.array->begin(), pos.m_it.array_iterator);
22442 m_value.array->insert(pos.m_it.array_iterator, std::forward<Args>(args)...);
22446 // result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, cnt, val);
22455 iterator insert(const_iterator pos, const basic_json& val)
22460 // check if iterator pos fits to this JSON value
22461 if (JSON_HEDLEY_UNLIKELY(pos.m_object != this))
22467 return insert_iterator(pos, val);
22475 iterator insert(const_iterator pos, basic_json&& val)
22477 return insert(pos, val);
22482 iterator insert(const_iterator pos, size_type cnt, const basic_json& val)
22487 // check if iterator pos fits to this JSON value
22488 if (JSON_HEDLEY_UNLIKELY(pos.m_object != this))
22494 return insert_iterator(pos, cnt, val);
22502 iterator insert(const_iterator pos, const_iterator first, const_iterator last)
22510 // check if iterator pos fits to this JSON value
22511 if (JSON_HEDLEY_UNLIKELY(pos.m_object != this))
22528 return insert_iterator(pos, first.m_it.array_iterator, last.m_it.array_iterator);
22533 iterator insert(const_iterator pos, initializer_list_t ilist)
22541 // check if iterator pos fits to this JSON value
22542 if (JSON_HEDLEY_UNLIKELY(pos.m_object != this))
22548 return insert_iterator(pos, ilist.begin(), ilist.end());