| 4224 | // all characters must be valid digits. |
| 4225 | template <typename UC> |
| 4226 | fastfloat_really_inline FASTFLOAT_CONSTEXPR20 bool |
| 4227 | is_truncated(UC const *first, UC const *last) noexcept { |
| 4228 | // do 8-bit optimizations, can just compare to 8 literal 0s. |
| 4229 | uint64_t val; |
| 4230 | while (!cpp20_and_in_constexpr() && |
| 4231 | std::distance(first, last) >= int_cmp_len<UC>()) { |
| 4232 | ::memcpy(&val, first, sizeof(uint64_t)); |
| 4233 | if (val != int_cmp_zeros<UC>()) { |
| 4234 | return true; |
| 4235 | } |
| 4236 | first += int_cmp_len<UC>(); |
| 4237 | } |
| 4238 | while (first != last) { |
| 4239 | if (*first != UC('0')) { |
| 4240 | return true; |
| 4241 | } |
| 4242 | ++first; |
| 4243 | } |
| 4244 | return false; |
| 4245 | } |
| 4246 | |
| 4247 | template <typename UC> |
| 4248 | fastfloat_really_inline FASTFLOAT_CONSTEXPR20 bool |
no test coverage detected