28 #ifndef WEBSOCKETPP_UTILITIES_IMPL_HPP 29 #define WEBSOCKETPP_UTILITIES_IMPL_HPP 37 inline std::string
to_lower(std::string
const & in) {
39 std::transform(out.begin(),out.end(),out.begin(),::tolower);
43 inline std::string
to_hex(std::string
const & input) {
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];
std::string string_replace_all(std::string subject, std::string const &search, std::string const &replace)
Replace all occurrances of a substring with another.
std::string to_hex(std::string const &input)
Convert std::string to ascii printed string of hex digits.
void handle_accept(connection_ptr con, lib::error_code const &ec)
Handler callback for start_accept.
std::string to_lower(std::string const &in)
Convert a string to lowercase.