Skip to content

Commit b7d46e6

Browse files
nigels-comNigel Stewart
authored andcommitted
Another overload of algorithm::hex_lower as lower-case alternative to algorithm::hex
1 parent d558476 commit b7d46e6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

include/boost/algorithm/hex.hpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,21 @@ String hex ( const String &input ) {
290290
return output;
291291
}
292292

293+
294+
/// \fn String hex_lower ( const String &input )
295+
/// \brief Converts a sequence of integral types into a lower case hexadecimal sequence of characters.
296+
///
297+
/// \param input A container to be converted
298+
/// \return A container with the encoded text
299+
template<typename String>
300+
String hex_lower ( const String &input ) {
301+
String output;
302+
output.reserve (input.size () * (2 * sizeof (typename String::value_type)));
303+
(void) hex_lower (input, std::back_inserter (output));
304+
return output;
305+
}
306+
307+
293308
/// \fn String unhex ( const String &input )
294309
/// \brief Converts a sequence of hexadecimal characters into a sequence of characters.
295310
///

0 commit comments

Comments
 (0)