MCPcopy Create free account
hub / github.com/1a1a11a/libCacheSim / get_string_node_value

Function get_string_node_value

example/cacheHierarchy/fkYAML/node.hpp:11114–11119  ·  view source on GitHub ↗

@brief Get a string value from the given node and, if necessary, escape its contents. @param[in] node The target string YAML node. @param[out] is_escaped Whether the contents of an output string has been escaped. @return The (escaped) string node value.

Source from the content-addressed store, hash-verified

11112 /// @param[out] is_escaped Whether the contents of an output string has been escaped.
11113 /// @return The (escaped) string node value.
11114 typename BasicNodeType::string_type get_string_node_value(const BasicNodeType& node, bool& is_escaped) {
11115 FK_YAML_ASSERT(node.is_string());
11116
11117 const auto& s = node.as_str();
11118 return yaml_escaper::escape(s.c_str(), s.c_str() + s.size(), is_escaped);
11119 } // LCOV_EXCL_LINE
11120
11121private:
11122 /// A temporal buffer for conversion from a scalar to a string.

Callers 1

serialize_nodeFunction · 0.85

Calls 2

escapeFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected