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

Function sliceString

Libraries/HttpClient/HttpClientSession.cpp:111–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111static SC::StringSpan sliceString(SC::StringSpan text, size_t start, size_t end)
112{
113 const SC::Span<const char> bytes = text.toCharSpan();
114 if (start > end or end > bytes.sizeInBytes())
115 {
116 return SC::StringSpan(text.getEncoding());
117 }
118 return {{bytes.data() + start, end - start}, false, text.getEncoding()};
119}
120
121static size_t findAuthChallengeEnd(SC::StringSpan value, size_t start)
122{

Callers 6

parseAuthRealmFunction · 0.85
splitOnceFunction · 0.85
parseUrlFunction · 0.85
defaultCookiePathFunction · 0.85
captureSetCookieMethod · 0.85

Calls 3

StringSpanFunction · 0.85
sizeInBytesMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected