23 #include "absl/base/attributes.h"
33 return (dividend + divisor - 1) / divisor;
36 constexpr
int64_t kSecondsPerMinute = 60;
37 constexpr
int64_t kMinutesPerHour = 60;
38 constexpr
int64_t kMaxHours = 27000;
41 while (p !=
end && *p ==
' ')
p++;
55 if (
a > 0)
return 100;
56 if (
a < 0)
return -100;
59 return 100 * (
a /
b - 1);
98 }
else if (
n >= 1000) {
100 }
else if (
n >= 100) {
102 }
else if (
n >= 10) {
109 *p++ =
'0' +
n / 10000;
113 *p++ =
'0' +
n / 1000;
117 *p++ =
'0' +
n / 100;
168 }
else if (millis < 1000) {
170 }
else if (millis < 10000) {
173 }
else if (millis < 100000) {
183 if (
seconds % kSecondsPerMinute != 0) {
188 if ((
value * 10) % kSecondsPerMinute != 0) {
193 if ((
value * 100) % kSecondsPerMinute != 0) {
202 if (minutes < 1000) {
203 if (minutes % kMinutesPerHour != 0) {
206 }
else if (minutes < 10000) {
208 if ((
value * 10) % kMinutesPerHour != 0) {
211 }
else if (minutes < 100000) {
213 if ((
value * 100) % kMinutesPerHour != 0) {
222 if (hours < kMaxHours) {
234 for (; p !=
end && *p ==
' '; p++) {
237 for (; p !=
end && *p >=
'0' && *p <=
'9'; p++) {
241 if (
x >= (100 * 1000 * 1000)) {
242 if (
x != (100 * 1000 * 1000) || digit != 0) {
248 if (!have_digit)
return absl::nullopt;
250 for (; p !=
end && *p ==
' '; p++) {
252 if (p ==
end)
return absl::nullopt;
277 return absl::nullopt;
280 if (!IsAllSpace(p,
end))
return absl::nullopt;