8 #ifndef COMPONENTS_CPP_UTILS_GENERALUTILS_H_
9 #define COMPONENTS_CPP_UTILS_GENERALUTILS_H_
21 static bool base64Decode(
const std::string& in, std::string* out);
22 static bool base64Encode(
const std::string& in, std::string* out);
24 static bool endsWith(std::string str,
char c);
27 static void hexDump(
const uint8_t* pData, uint32_t length);
29 static std::vector<std::string>
split(std::string source,
char delimiter);
30 static std::string
toLower(std::string& value);
31 static std::string
trim(
const std::string& str);
General utilities.
Definition: GeneralUtils.h:19
static void dumpInfo()
Dump general info to the log. Data includes:
Definition: GeneralUtils.cpp:108
static bool endsWith(std::string str, char c)
Does the string end with a specific character?
Definition: GeneralUtils.cpp:126
static std::vector< std::string > split(std::string source, char delimiter)
Split a string into parts based on a delimiter.
Definition: GeneralUtils.cpp:349
static const char * errorToString(esp_err_t errCode)
Convert an ESP error code to a string.
Definition: GeneralUtils.cpp:366
static bool base64Encode(const std::string &in, std::string *out)
Encode a string into base 64.
Definition: GeneralUtils.cpp:59
static std::string toLower(std::string &value)
Convert a string to lower case.
Definition: GeneralUtils.cpp:522
static bool base64Decode(const std::string &in, std::string *out)
Decode a chunk of data that is base64 encoded.
Definition: GeneralUtils.cpp:163
static std::string trim(const std::string &str)
Remove white space from a string.
Definition: GeneralUtils.cpp:533
static const char * wifiErrorToString(uint8_t value)
Convert a wifi_err_reason_t code to a string.
Definition: GeneralUtils.cpp:448
static std::string ipToString(uint8_t *ip)
Convert an IP address to string.
Definition: GeneralUtils.cpp:336
static void hexDump(const uint8_t *pData, uint32_t length)
Dump a representation of binary data to the console.
Definition: GeneralUtils.cpp:293