| 195 | } |
| 196 | |
| 197 | INT64 |
| 198 | StringUtils::str2longlong(const std::string &s) |
| 199 | { |
| 200 | INT64 i = 0; |
| 201 | size_t j; |
| 202 | if (s.find("0x")==0) { |
| 203 | for (j=2; j<s.length(); j++) { |
| 204 | int v = 0; |
| 205 | if (s[j] >= '0' && s[j] <= '9') { |
| 206 | v = s[j] - '0'; |
| 207 | } else if (s[j] >= 'A' && s[j] <= 'F') { |
| 208 | v = 10 + s[j] - 'A'; |
| 209 | } else { |
| 210 | break; |
| 211 | } |
| 212 | i = i * 16 + v; |
| 213 | } |
| 214 | } |
| 215 | else { |
| 216 | stringstream ss(s); |
| 217 | ss >> i; |
| 218 | } |
| 219 | return i; |
| 220 | } |
| 221 | |
| 222 | std::string |
| 223 | StringUtils::longlong2str(INT64 i) |
nothing calls this directly
no outgoing calls
no test coverage detected