MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / write_escaped_string

Function write_escaped_string

source/extern/fmt/format.h:1906–1919  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1904
1905template <typename Char, typename OutputIt>
1906auto write_escaped_string(OutputIt out, basic_string_view<Char> str)
1907 -> OutputIt {
1908 *out++ = static_cast<Char>('"');
1909 auto begin = str.begin(), end = str.end();
1910 do {
1911 auto escape = find_escape(begin, end);
1912 out = copy_str<Char>(begin, escape.begin, out);
1913 begin = escape.end;
1914 if (!begin) break;
1915 out = write_escaped_cp<OutputIt, Char>(out, escape);
1916 } while (begin != end);
1917 *out++ = static_cast<Char>('"');
1918 return out;
1919}
1920
1921template <typename Char, typename OutputIt>
1922auto write_escaped_char(OutputIt out, Char v) -> OutputIt {

Callers 1

writeMethod · 0.85

Calls 3

find_escapeFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected