|
| DROGON_EXPORT const std::string_view & | drogon::statusCodeToString (int code) |
| | Get the HTTP messages corresponding to the HTTP status codes.
|
|
DROGON_EXPORT bool | drogon::utils::isInteger (std::string_view str) |
| | Determine if the string is an integer.
|
|
DROGON_EXPORT bool | drogon::utils::isBase64 (std::string_view str) |
| | Determine if the string is base64 encoded.
|
| DROGON_EXPORT std::string | drogon::utils::genRandomString (int length) |
| | Generate random a string.
|
|
DROGON_EXPORT std::string | drogon::utils::binaryStringToHex (const unsigned char *ptr, size_t length, bool lowerCase=false) |
| | Convert a binary string to hex format.
|
|
DROGON_EXPORT std::string | drogon::utils::hexToBinaryString (const char *ptr, size_t length) |
| | Get a binary string from hexadecimal format.
|
|
DROGON_EXPORT std::vector< char > | drogon::utils::hexToBinaryVector (const char *ptr, size_t length) |
| | Get a binary vector from hexadecimal format.
|
|
DROGON_EXPORT void | drogon::utils::binaryStringToHex (const char *ptr, size_t length, char *out, bool lowerCase=false) |
| std::vector< std::string > | drogon::utils::splitString (const std::string &str, const std::string &separator, bool acceptEmptyString=false) |
| | Split the string into multiple separated strings.
|
|
DROGON_EXPORT std::set< std::string > | drogon::utils::splitStringToSet (const std::string &str, const std::string &separator) |
| bool | drogon::utils::ci_equals (std::string_view str1, std::string_view str2) |
| | Compare two string_views for equality, ignoring case.
|
| std::string_view & | drogon::utils::trim_inplace (std::string_view &str) |
| std::string_view | drogon::utils::trim (std::string_view str) |
| | Trim leading and trailing spaces and tabs from a string_view.
|
| std::string | drogon::utils::trim (std::string &&str) |
| | Trim leading and trailing spaces and tabs from a rvalue string.
|
| std::vector< std::string_view > | drogon::utils::splitStringView (std::string_view str, std::string_view separator, bool trimValues=true, bool acceptEmptyString=false) |
| | Split a string_view into a vector of string_views.
|
| std::set< std::string_view > | drogon::utils::splitStringViewToSet (std::string_view str, std::string_view separator, bool trimValues=true, bool acceptEmptyString=false) |
| | Split a string_view into a set of string_views. \copyparams splitStringView.
|
| std::string | drogon::utils::joinStringViews (const std::vector< std::string_view > &strs, std::string_view separator) |
| | Join a vector of string_view into a string.
|
| std::string | drogon::utils::joinStringViews (const std::set< std::string_view > &strs, std::string_view separator) |
| | Join a set of string_view into a string.
|
|
DROGON_EXPORT std::string | drogon::utils::getUuid (bool lowercase=true) |
| | Get UUID string.
|
|
constexpr size_t | drogon::utils::base64EncodedLength (size_t in_len, bool padded=true) |
| | Get the encoded length of base64.
|
|
DROGON_EXPORT void | drogon::utils::base64Encode (const unsigned char *bytesToEncode, size_t inLen, unsigned char *outputBuffer, bool urlSafe=false, bool padded=true) |
| | Encode the string to base64 format.
|
|
std::string | drogon::utils::base64Encode (const unsigned char *bytesToEncode, size_t inLen, bool urlSafe=false, bool padded=true) |
| | Encode the string to base64 format.
|
|
std::string | drogon::utils::base64Encode (std::string_view data, bool urlSafe=false, bool padded=true) |
| | Encode the string to base64 format.
|
|
void | drogon::utils::base64EncodeUnpadded (const unsigned char *bytesToEncode, size_t inLen, unsigned char *outputBuffer, bool urlSafe=false) |
| | Encode the string to base64 format with no padding.
|
|
std::string | drogon::utils::base64EncodeUnpadded (const unsigned char *bytesToEncode, size_t inLen, bool urlSafe=false) |
| | Encode the string to base64 format with no padding.
|
|
std::string | drogon::utils::base64EncodeUnpadded (std::string_view data, bool urlSafe=false) |
| | Encode the string to base64 format with no padding.
|
|
constexpr size_t | drogon::utils::base64DecodedLength (size_t inLen) |
| | Get the decoded length of base64.
|
| DROGON_EXPORT size_t | drogon::utils::base64Decode (const char *encodedString, size_t inLen, unsigned char *outputBuffer) |
|
std::string | drogon::utils::base64Decode (std::string_view encodedString) |
| | Decode the base64 format string.
|
|
DROGON_EXPORT std::vector< char > | drogon::utils::base64DecodeToVector (std::string_view encodedString) |
|
DROGON_EXPORT bool | drogon::utils::needUrlDecoding (const char *begin, const char *end) |
| | Check if the string need decoding.
|
|
DROGON_EXPORT std::string | drogon::utils::urlDecode (const char *begin, const char *end) |
| | Decode from or encode to the URL format string.
|
|
std::string | drogon::utils::urlDecode (const std::string &szToDecode) |
|
std::string | drogon::utils::urlDecode (const std::string_view &szToDecode) |
|
DROGON_EXPORT std::string | drogon::utils::urlEncode (const std::string &) |
|
DROGON_EXPORT std::string | drogon::utils::urlEncodeComponent (const std::string &) |
|
DROGON_EXPORT std::string | drogon::utils::getMd5 (const char *data, const size_t dataLen) |
| | Get the MD5 digest of a string.
|
|
std::string | drogon::utils::getMd5 (const std::string &originalString) |
|
DROGON_EXPORT std::string | drogon::utils::getSha1 (const char *data, const size_t dataLen) |
|
std::string | drogon::utils::getSha1 (const std::string &originalString) |
|
DROGON_EXPORT std::string | drogon::utils::getSha256 (const char *data, const size_t dataLen) |
|
std::string | drogon::utils::getSha256 (const std::string &originalString) |
|
DROGON_EXPORT std::string | drogon::utils::getSha3 (const char *data, const size_t dataLen) |
|
std::string | drogon::utils::getSha3 (const std::string &originalString) |
|
DROGON_EXPORT std::string | drogon::utils::getBlake2b (const char *data, const size_t dataLen) |
|
std::string | drogon::utils::getBlake2b (const std::string &originalString) |
| DROGON_EXPORT std::string | drogon::utils::gzipCompress (const char *data, const size_t ndata) |
| | Compress or decompress data using gzip lib.
|
|
DROGON_EXPORT std::string | drogon::utils::gzipDecompress (const char *data, const size_t ndata) |
| DROGON_EXPORT std::string | drogon::utils::brotliCompress (const char *data, const size_t ndata) |
| | Compress or decompress data using brotli lib.
|
|
DROGON_EXPORT std::string | drogon::utils::brotliDecompress (const char *data, const size_t ndata) |
| DROGON_EXPORT char * | drogon::utils::getHttpFullDate (const trantor::Date &date=trantor::Date::now()) |
| | Get the http full date string.
|
|
DROGON_EXPORT const std::string & | drogon::utils::getHttpFullDateStr (const trantor::Date &date=trantor::Date::now()) |
|
DROGON_EXPORT void | drogon::utils::dateToCustomFormattedString (const std::string &fmtStr, std::string &str, const trantor::Date &date) |
| DROGON_EXPORT trantor::Date | drogon::utils::getHttpDate (const std::string &httpFullDateString) |
| | Get the trantor::Date object according to the http full date string.
|
|
DROGON_EXPORT std::string | drogon::utils::formattedString (const char *format,...) |
| | Get a formatted string.
|
| DROGON_EXPORT int | drogon::utils::createPath (const std::string &path) |
| | Recursively create a file system path.
|
| std::string | drogon::utils::fromWidePath (const std::wstring &strPath) |
| std::wstring | drogon::utils::toWidePath (const std::string &strUtf8Path) |
| const std::string & | drogon::utils::toNativePath (const std::string &strPath) |
| | Convert a generic (UTF-8) path with to an OS native path.
|
|
std::string | drogon::utils::toNativePath (const std::wstring &strPath) |
| const std::string & | drogon::utils::fromNativePath (const std::string &strPath) |
| | Convert a OS native path (wide string on Windows) to a generic UTF-8 path.
|
|
std::string | drogon::utils::fromNativePath (const std::wstring &strPath) |
| DROGON_EXPORT void | drogon::utils::replaceAll (std::string &s, const std::string &from, const std::string &to) |
| | Replace all occurrences of from to to inplace.
|
| DROGON_EXPORT bool | drogon::utils::secureRandomBytes (void *ptr, size_t size) |
| | Generates cryptographically secure random bytes.
|
| DROGON_EXPORT std::string | drogon::utils::secureRandomString (size_t size) |
| | Generates cryptographically secure random string.
|
|
template<typename T> |
| T | drogon::utils::fromString (const std::string &p) noexcept(false) |
|
template<> |
| std::string | drogon::utils::fromString< std::string > (const std::string &p) noexcept(false) |
|
template<> |
| bool | drogon::utils::fromString< bool > (const std::string &p) noexcept(false) |
|
DROGON_EXPORT bool | drogon::utils::supportsTls () noexcept |
|
LogStream & | trantor::operator<< (LogStream &ls, const std::string_view &v) |
|
LogStream & | trantor::operator<< (LogStream &ls, const std::filesystem::path &p) |