Another overload of algorithm::hex_lower as lower-case alternative to algorithm::hex

This commit is contained in:
Nigel Stewart
2016-01-31 20:17:23 +10:00
parent cc1392cae6
commit 073eb62f64

View File

@ -290,6 +290,21 @@ String hex ( const String &input ) {
return output;
}
/// \fn String hex_lower ( const String &input )
/// \brief Converts a sequence of integral types into a lower case hexadecimal sequence of characters.
///
/// \param input A container to be converted
/// \return A container with the encoded text
template<typename String>
String hex_lower ( const String &input ) {
String output;
output.reserve (input.size () * (2 * sizeof (typename String::value_type)));
(void) hex_lower (input, std::back_inserter (output));
return output;
}
/// \fn String unhex ( const String &input )
/// \brief Converts a sequence of hexadecimal characters into a sequence of characters.
///