Returns true and fills in "*val" iff "*in" starts with a decimal number.
| 76 | // Returns true and fills in "*val" iff "*in" starts with a decimal |
| 77 | // number. |
| 78 | static bool ConsumeNumber(StringPiece* in, int* val) { |
| 79 | uint64 tmp; |
| 80 | if (str_util::ConsumeLeadingDigits(in, &tmp)) { |
| 81 | *val = tmp; |
| 82 | return true; |
| 83 | } else { |
| 84 | return false; |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | // Returns a fully qualified device name given the parameters. |
| 89 | static string DeviceName(const string& job, int replica, int task, |
no test coverage detected