MCPcopy Create free account
hub / github.com/SICKAG/sick_scan_xd / decodePrefixedString

Function decodePrefixedString

test/docker/jsoncpp/src/lib_json/json_value.cpp:153–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151 return newString;
152}
153inline static void decodePrefixedString(bool isPrefixed, char const* prefixed,
154 unsigned* length, char const** value) {
155 if (!isPrefixed) {
156 *length = static_cast<unsigned>(strlen(prefixed));
157 *value = prefixed;
158 } else {
159 *length = *reinterpret_cast<unsigned const*>(prefixed);
160 *value = prefixed + sizeof(unsigned);
161 }
162}
163/** Free the string duplicated by
164 * duplicateStringValue()/duplicateAndPrefixStringValue().
165 */

Callers 8

operator<Method · 0.85
operator==Method · 0.85
asCStringMethod · 0.85
getCStringLengthMethod · 0.85
getStringMethod · 0.85
asStringMethod · 0.85
dupPayloadMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected