@brief Copys the referenced character sequence values from `pos` by `n` size. @warning Throws an fkyaml::out_of_range exception if the given `pos` is bigger than the length. @param p_str The pointer to a character sequence buffer for output. @param n The number of elements to write into `p_str`. @param pos The offset of the beginning position to copy values. @return The number of elements to be wr
| 2436 | /// @param pos The offset of the beginning position to copy values. |
| 2437 | /// @return The number of elements to be written into `p_str`. |
| 2438 | size_type copy(CharT* p_str, size_type n, size_type pos = 0) const { |
| 2439 | if FK_YAML_UNLIKELY (pos > m_len) { |
| 2440 | throw fkyaml::out_of_range(static_cast<int>(pos)); |
| 2441 | } |
| 2442 | const size_type rlen = std::min(n, m_len - pos); |
| 2443 | traits_type::copy(p_str, mp_str + pos, rlen); |
| 2444 | return rlen; |
| 2445 | } |
| 2446 | |
| 2447 | /// @brief Constructs a sub basic_str_view object from `pos` by `n` size. |
| 2448 | /// @warning Throws an fkyaml::out_of_range exception if the given `pos` is bigger than the length. |
no test coverage detected