| 1848 | |
| 1849 | template <typename Char, typename OutputIt> |
| 1850 | auto write_escaped_string(OutputIt out, basic_string_view<Char> str) |
| 1851 | -> OutputIt { |
| 1852 | *out++ = static_cast<Char>('"'); |
| 1853 | auto begin = str.begin(), end = str.end(); |
| 1854 | do { |
| 1855 | auto escape = find_escape(begin, end); |
| 1856 | out = copy<Char>(begin, escape.begin, out); |
| 1857 | begin = escape.end; |
| 1858 | if (!begin) break; |
| 1859 | out = write_escaped_cp<OutputIt, Char>(out, escape); |
| 1860 | } while (begin != end); |
| 1861 | *out++ = static_cast<Char>('"'); |
| 1862 | return out; |
| 1863 | } |
| 1864 | |
| 1865 | template <typename Char, typename OutputIt> |
| 1866 | auto write_escaped_char(OutputIt out, Char v) -> OutputIt { |
no test coverage detected