MCPcopy Create free account
hub / github.com/Kitware/VTK / decodePrefixedString

Function decodePrefixedString

ThirdParty/jsoncpp/vtkjsoncpp/jsoncpp.cpp:2591–2600  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2589 return newString;
2590}
2591inline static void decodePrefixedString(bool isPrefixed, char const* prefixed,
2592 unsigned* length, char const** value) {
2593 if (!isPrefixed) {
2594 *length = static_cast<unsigned>(strlen(prefixed));
2595 *value = prefixed;
2596 } else {
2597 *length = *reinterpret_cast<unsigned const*>(prefixed);
2598 *value = prefixed + sizeof(unsigned);
2599 }
2600}
2601/** Free the string duplicated by
2602 * duplicateStringValue()/duplicateAndPrefixStringValue().
2603 */

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