MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / appendTo

Method appendTo

Libraries/Http/HttpHeaders.cpp:149–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147 }
148
149 static bool appendTo(Span<char> storage, size_t& offset, StringSpan value)
150 {
151 if (offset + value.sizeInBytes() > storage.sizeInBytes())
152 {
153 return false;
154 }
155 for (size_t idx = 0; idx < value.sizeInBytes(); ++idx)
156 {
157 storage.data()[offset + idx] = value.bytesWithoutTerminator()[idx];
158 }
159 offset += value.sizeInBytes();
160 return true;
161 }
162
163 static char basicCredentialByte(StringSpan username, StringSpan password, size_t index)
164 {

Callers

nothing calls this directly

Calls 2

sizeInBytesMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected