{
auto strHeader = str.substr(0, nColon);
boost::trim(strHeader);
- boost::to_lower(strHeader);
+ transform(strHeader.begin(), strHeader.end(), strHeader.begin(), ::tolower);
auto strValue = str.substr(nColon+1);
boost::trim(strValue);
mapHeadersRet[strHeader] = strValue;
typedef SSIZE_T ssize_t;
#endif
-#include <boost/algorithm/string/case_conv.hpp> // for to_lower()
-
using namespace std;
// Settings
static const unsigned char pchIPv4[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff };
enum Network ParseNetwork(std::string net) {
- boost::to_lower(net);
+ transform(net.begin(), net.end(), net.begin(), ::tolower);
if (net == "ipv4") return NET_IPV4;
if (net == "ipv6") return NET_IPV6;
if (net == "tor" || net == "onion") return NET_TOR;
std::string strHost(strName);
if (strHost.empty())
return false;
- if ((strHost.compare(0,1, "[") == 0) && (strHost.compare(strHost.length()-1,1, "]") == 0))
+ if ((strHost.front() == '[') && (strHost.back() == ']'))
{
strHost = strHost.substr(1, strHost.size() - 2);
}
std::string strHost(pszName);
if (strHost.empty())
return false;
- if ((strHost.compare(0,1, "[") == 0) && (strHost.compare(strHost.length()-1,1, "]") == 0))
+ if ((strHost.front() == '[') && (strHost.back() == ']'))
{
strHost = strHost.substr(1, strHost.size() - 2);
}
#include <random>
#include <boost/algorithm/string/join.hpp>
-#include <boost/algorithm/string/case_conv.hpp> // for to_lower()
#include <boost/program_options/detail/config_file.hpp>
#include <boost/program_options/parsers.hpp>
#include <boost/filesystem.hpp>
str = str.substr(0, is_index);
}
#ifdef WIN32
- boost::to_lower(str);
+ transform(str.begin(), str.end(), str.begin(), ::tolower);
if (str.compare(0,1, "/") == 0)
str = "-" + str.substr(1);
#endif