14 string STG::ToLower(const string & val, const locale & loc)
17 transform(val.begin(),
20 STG::ToLowerHelper(loc));
24 string STG::ToUpper(const string & val, const locale & loc)
27 transform(val.begin(),
30 STG::ToUpperHelper(loc));
34 string STG::Trim(const string & val, const locale & loc)
38 string::const_iterator first(find_if(
41 STG::IsNotSpace(loc)));
42 string::const_reverse_iterator last(find_if(
45 STG::IsNotSpace(loc)));
46 if (first == val.end())
48 return std::string(first, last.base());
50 std::string inet_ntostring(uint32_t ip)
52 char buf[INET_ADDRSTRLEN + 1];
54 return inet_ntop(AF_INET, &ip, buf, INET_ADDRSTRLEN);