16 std::vector<std::string>
split(
const std::string &s,
char delim) {
17 std::vector<std::string> elems;
18 std::stringstream ss(s);
20 while(std::getline(ss, item, delim)) {
21 elems.push_back(item);
29 return std::string(
"0");
33 int numdigits = floor(log10(i))+1;
34 int divisor = pow(10, numdigits-1);
36 while (currdigit != numdigits)
38 tmp += (
'0' + (i/divisor)%10);
41 if ((0 == (numdigits-currdigit)%3) && (numdigits != currdigit))