MCPcopy Create free account
hub / github.com/Alan-CRL/Inkeys / decodePrefixedString

Function decodePrefixedString

Timeout/InkeysTimeout/json/lib_json/json_value.cpp:153–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151 return newString;
152 }
153 inline 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 }
159 else {
160 *length = *reinterpret_cast<unsigned const*>(prefixed);
161 *value = prefixed + sizeof(unsigned);
162 }
163 }
164 /** Free the string duplicated by
165 * duplicateStringValue()/duplicateAndPrefixStringValue().
166 */

Callers 8

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

Calls

no outgoing calls

Tested by

no test coverage detected