11#include <nlohmann/detail/abi_macros.hpp>
13NLOHMANN_JSON_NAMESPACE_BEGIN
30template<
typename StringType>
34 JSON_ASSERT(!f.empty());
35 for (
auto pos = s.find(f);
36 pos != StringType::npos;
37 s.replace(pos, f.size(), t),
38 pos = s.find(f, pos + t.size()))
49template<
typename StringType>
50inline StringType
escape(StringType s)
64template<
typename StringType>
72NLOHMANN_JSON_NAMESPACE_END
detail namespace with internal helper functions
定义 from_json.hpp:43
void unescape(StringType &s)
string unescaping as described in RFC 6901 (Sect. 4)
定义 string_escape.hpp:65
StringType escape(StringType s)
string escaping as described in RFC 6901 (Sect. 4)
定义 string_escape.hpp:50
void replace_substring(StringType &s, const StringType &f, const StringType &t)
replace all occurrences of a substring by another string
定义 string_escape.hpp:31