Utility library for MTS Socket Modem Arduino Shield devices from Multi-Tech Systems
Dependents: mtsas mtsas thermostat_fan_demo--fan mtsas ... more
NOTE: MTS-Utils has moved to GitHub. This version will not be updated. For updates, go to the GitHub version.
Diff: MTSText.h
- Revision:
- 14:1d88cf5266c8
- Parent:
- 13:4709c2dfcd11
- Child:
- 15:ae12624eb600
--- a/MTSText.h Mon Jun 08 15:30:12 2015 -0500 +++ b/MTSText.h Wed Sep 09 11:59:59 2015 -0500 @@ -53,11 +53,17 @@ static std::string toUpper(const std::string str); - std::string float2String(double val, int precision); + static std::string float2String(double val, int precision); static std::string bin2hexString(const std::vector<uint8_t>& data, const char* delim = "", bool leadingZeros = false); static std::string bin2hexString(const uint8_t* data, const uint32_t len, const char* delim = "", bool leadingZeros = false); + + static std::string bin2base64(const std::vector<uint8_t>& data); + + static std::string bin2base64(const uint8_t* data, size_t size); + + static bool base642bin(const std::string in, std::vector<uint8_t>& out); static void ltrim(std::string& str, const char* args);