Functions

  • void PutTwoDigits (uint32_t i, char * _Nonnull buf)

    Writes a two-character representation of 'i' to 'buf'. 'i' must be in the

    range 0

    <

    = i

    <

    100, and buf must have space for two characters. Example:

    char buf[2];

    PutTwoDigits(42, buf);

    // buf[0] == '4'

    // buf[1] == '2'

  • template <typename int_type>
    bool is_signed ()

    Defined at line 130 of file ../../third_party/abseil-cpp/src/absl/strings/numbers.h

  • bool safe_strto8_base (absl::string_view text, int8_t * _Nonnull value, int base)

    safe_strto?() functions for implementing SimpleAtoi()

  • bool safe_strto16_base (absl::string_view text, int16_t * _Nonnull value, int base)
  • bool safe_strto32_base (absl::string_view text, int32_t * _Nonnull value, int base)
  • bool safe_strto64_base (absl::string_view text, int64_t * _Nonnull value, int base)
  • bool safe_strto128_base (absl::string_view text, absl::int128 * _Nonnull value, int base)
  • bool safe_strtou8_base (absl::string_view text, uint8_t * _Nonnull value, int base)
  • bool safe_strtou16_base (absl::string_view text, uint16_t * _Nonnull value, int base)
  • bool safe_strtou32_base (absl::string_view text, uint32_t * _Nonnull value, int base)
  • bool safe_strtou64_base (absl::string_view text, uint64_t * _Nonnull value, int base)
  • bool safe_strtou128_base (absl::string_view text, absl::uint128 * _Nonnull value, int base)
  • size_t SixDigitsToBuffer (double d, char * _Nonnull buffer)

    Helper function for fast formatting of floating-point values.

    The result is the same as printf's "%g", a.k.a. "%.6g"; that is, six

    significant digits are returned, trailing zeros are removed, and numbers

    outside the range 0.0001-999999 are output using scientific notation

    (1.23456e+06). This routine is heavily optimized.

    Required buffer size is `kSixDigitsToBufferSize`.

  • char * _Nonnull FastIntToBuffer (int32_t i, char * _Nonnull buffer)

    WARNING: These functions may write more characters than necessary, because

    they are intended for speed. All functions take an output buffer

    as an argument and return a pointer to the last byte they wrote, which is the

    terminating '

    \

    0'. The maximum size written is `kFastToBufferSize` for 64-bit

    integers or less, and `kFastToBuffer128Size` for 128-bit integers.

  • char * _Nonnull FastIntToBuffer (uint32_t n, char * _Nonnull out_str)
  • char * _Nonnull FastIntToBuffer (int64_t i, char * _Nonnull buffer)
  • char * _Nonnull FastIntToBuffer (uint64_t i, char * _Nonnull buffer)
  • char * _Nonnull FastIntToBuffer (int128 i, char * _Nonnull buffer)
  • char * _Nonnull FastIntToBuffer (uint128 i, char * _Nonnull buffer)
  • template <typename int_type>
    char * _Nonnull FastIntToBuffer (int_type i, char * _Nonnull buffer)

    For enums and integer types that are up to 128 bits and are not an exact

    match for the types above, use templates to call the appropriate one of the

    four overloads above.

    Defined at line 211 of file ../../third_party/abseil-cpp/src/absl/strings/numbers.h

  • template <typename int_type>
    bool safe_strtoi_base (absl::string_view s, int_type * _Nonnull out, int base)

    Implementation of SimpleAtoi, generalized to support arbitrary base (used

    with base different from 10 elsewhere in Abseil implementation).

    Defined at line 242 of file ../../third_party/abseil-cpp/src/absl/strings/numbers.h

  • size_t FastHexToBufferZeroPad16 (uint64_t val, char * _Nonnull out)

    FastHexToBufferZeroPad16()

    Outputs `val` into `out` as if by `snprintf(out, 17, "%016x", val)` but

    without the terminating null character. Thus `out` must be of length >= 16.

    Returns the number of non-pad digits of the output (it can never be zero

    since 0 has one digit).

    Defined at line 299 of file ../../third_party/abseil-cpp/src/absl/strings/numbers.h

Variables

const int kFastToBuffer128Size

Defined at line 177 of file ../../third_party/abseil-cpp/src/absl/strings/numbers.h

const int kFastToBufferSize

Defined at line 178 of file ../../third_party/abseil-cpp/src/absl/strings/numbers.h

const char[17] kHexChar
const char[513] kHexTable
const int kSixDigitsToBufferSize

Defined at line 179 of file ../../third_party/abseil-cpp/src/absl/strings/numbers.h