| 11977 | */ |
| 11978 | template<typename NumberType> |
| 11979 | bool get_string(const input_format_t format, |
| 11980 | const NumberType len, |
| 11981 | string_t& result) |
| 11982 | { |
| 11983 | bool success = true; |
| 11984 | for (NumberType i = 0; i < len; i++) |
| 11985 | { |
| 11986 | get(); |
| 11987 | if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(format, "string"))) |
| 11988 | { |
| 11989 | success = false; |
| 11990 | break; |
| 11991 | } |
| 11992 | result.push_back(static_cast<typename string_t::value_type>(current)); |
| 11993 | } |
| 11994 | return success; |
| 11995 | } |
| 11996 | |
| 11997 | /*! |
| 11998 | @brief create a byte array by reading bytes from the input |
no test coverage detected