MCPcopy Create free account
hub / github.com/Tracktion/choc / encodeToString

Function encodeToString

choc/memory/choc_Base64.h:121–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121inline std::string encodeToString (const void* inputBinaryData, size_t numInputBytes)
122{
123 std::string s;
124 s.reserve (((numInputBytes / 3u) + (numInputBytes % 3u)) * 4u);
125
126 encodeToFrames (inputBinaryData, numInputBytes, [&] (char c1, char c2, char c3, char c4)
127 {
128 s += c1; s += c2; s += c3; s += c4;
129 });
130
131 return s;
132}
133
134template <typename Container>
135std::string encodeToString (const Container& c)

Callers 2

readIntoBase64Method · 0.85
testStringUtilitiesFunction · 0.85

Calls 3

encodeToFramesFunction · 0.85
reserveMethod · 0.45
sizeMethod · 0.45

Tested by 1

testStringUtilitiesFunction · 0.68