handy_http_transport.helpers

Undocumented in source.

Members

Functions

consumeUntil
Either!(string, "value", StreamError, "error") consumeUntil(S inputStream, string target)

Helper function to consume string content from an input stream until a certain target pattern of characters is encountered.

indexOf
ptrdiff_t indexOf(string s, char c, size_t offset)

Internal helper function to get the first index of a character in a string.

stripSpaces
string stripSpaces(string s)

Internal helper function that returns the slice of a string excluding any preceding or trailing spaces.

writeUIntToBuffer
void writeUIntToBuffer(uint value, char[] buffer, size_t idx)

Helper function to append an unsigned integer value to a char buffer. It is assumed that there's enough space to write the value.