Changeset View
Changeset View
Standalone View
Standalone View
src/util/strencodings.h
Show First 20 Lines • Show All 211 Lines • ▼ Show 20 Lines | if (pad) { | ||||
} | } | ||||
} else if (bits >= frombits || ((acc << (tobits - bits)) & maxv)) { | } else if (bits >= frombits || ((acc << (tobits - bits)) & maxv)) { | ||||
return false; | return false; | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
/** Parse an HD keypaths like "m/7/0'/2000". */ | |||||
NODISCARD bool ParseHDKeypath(const std::string &keypath_str, | |||||
std::vector<uint32_t> &keypath); | |||||
/** | /** | ||||
* Converts the given character to its lowercase equivalent. | * Converts the given character to its lowercase equivalent. | ||||
* This function is locale independent. It only converts uppercase | * This function is locale independent. It only converts uppercase | ||||
* characters in the standard 7-bit ASCII range. | * characters in the standard 7-bit ASCII range. | ||||
* @param[in] c the character to convert to lowercase. | * @param[in] c the character to convert to lowercase. | ||||
* @return the lowercase equivalent of c; or the argument | * @return the lowercase equivalent of c; or the argument | ||||
* if no conversion is possible. | * if no conversion is possible. | ||||
*/ | */ | ||||
Show All 35 Lines |