Changeset View
Changeset View
Standalone View
Standalone View
src/util/strencodings.h
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
bool IsHex(const std::string &str); | bool IsHex(const std::string &str); | ||||
/** | /** | ||||
* Return true if the string is a hex number, optionally prefixed with "0x" | * Return true if the string is a hex number, optionally prefixed with "0x" | ||||
*/ | */ | ||||
bool IsHexNumber(const std::string &str); | bool IsHexNumber(const std::string &str); | ||||
std::vector<uint8_t> DecodeBase64(const char *p, bool *pf_invalid = nullptr); | std::vector<uint8_t> DecodeBase64(const char *p, bool *pf_invalid = nullptr); | ||||
std::string DecodeBase64(const std::string &str, bool *pf_invalid = nullptr); | std::string DecodeBase64(const std::string &str, bool *pf_invalid = nullptr); | ||||
std::string EncodeBase64(const uint8_t *pch, size_t len); | std::string EncodeBase64(Span<const uint8_t> input); | ||||
std::string EncodeBase64(const std::string &str); | std::string EncodeBase64(const std::string &str); | ||||
std::vector<uint8_t> DecodeBase32(const char *p, bool *pf_invalid = nullptr); | std::vector<uint8_t> DecodeBase32(const char *p, bool *pf_invalid = nullptr); | ||||
std::string DecodeBase32(const std::string &str, bool *pf_invalid = nullptr); | std::string DecodeBase32(const std::string &str, bool *pf_invalid = nullptr); | ||||
std::string EncodeBase32(const uint8_t *pch, size_t len); | std::string EncodeBase32(Span<const uint8_t> input); | ||||
std::string EncodeBase32(const std::string &str); | std::string EncodeBase32(const std::string &str); | ||||
void SplitHostPort(std::string in, int &portOut, std::string &hostOut); | void SplitHostPort(std::string in, int &portOut, std::string &hostOut); | ||||
int64_t atoi64(const std::string &str); | int64_t atoi64(const std::string &str); | ||||
int atoi(const std::string &str); | int atoi(const std::string &str); | ||||
/** | /** | ||||
* Tests if the given character is a decimal digit. | * Tests if the given character is a decimal digit. | ||||
▲ Show 20 Lines • Show All 202 Lines • Show Last 20 Lines |