28 #ifndef WEBSOCKETPP_UTILITIES_IMPL_HPP
29 #define WEBSOCKETPP_UTILITIES_IMPL_HPP
39 std::transform(out.begin(),out.end(),out.begin(),::tolower);
45 std::string hex =
"0123456789ABCDEF";
47 for (size_t i = 0; i < input.size(); i++) {
48 output += hex[(input[i] & 0xF0) >> 4];
49 output += hex[input[i] & 0x0F];
58 std::string hex =
"0123456789ABCDEF";
60 for (size_t i = 0; i < length; i++) {
61 output += hex[(input[i] & 0xF0) >> 4];
62 output += hex[input[i] & 0x0F];
70 return to_hex(
reinterpret_cast<
const uint8_t*>(input),length);
77 while((pos = subject.find(search, pos)) != std::string::npos) {
78 subject.replace(pos, search.length(), replace);
79 pos += replace.length();