| 390 | } |
| 391 | |
| 392 | bool StringToFp(const string& s, Fprint* fp) { |
| 393 | char junk; |
| 394 | uint64_t result; |
| 395 | if (sscanf(s.c_str(), "%" SCNx64 "%c", &result, &junk) == 1) { |
| 396 | *fp = result; |
| 397 | return true; |
| 398 | } else { |
| 399 | return false; |
| 400 | } |
| 401 | } |
| 402 | |
| 403 | StringPiece Uint64ToHexString(uint64 v, char* buf) { |
| 404 | static const char* hexdigits = "0123456789abcdef"; |