[added with C99]
de>abs · div · imaxabs · imaxdiv · imaxdiv_t · strtoimax · strtoumax · wcstoimax · wcstoumax de>
de>PRId8 · PRId16 · PRId32 · PRId64 · PRIdFAST8 · PRIdFAST16 · PRIdFAST32 · PRIdFAST64 · PRIdLEAST8 · PRIdLEAST16 · PRIdLEAST32 · PRIdLEAST64 · PRIdMAX · PRIdPTR · PRIi8 · PRIi16 · PRIi32 · PRIi64 · PRIiFAST8 · PRIiFAST16 · PRIiFAST32 · PRIiFAST64 · PRIiLEAST8 · PRIiLEAST16 · PRIiLEAST32 · PRIiLEAST64 · PRIiMAX · PRIiPTR · PRIo8 · PRIo16 · PRIo32 · PRIo64 · PRIoFAST8 · PRIoFAST16 · PRIoFAST32 · PRIoFAST64 · PRIoLEAST8 · PRIoLEAST16 · PRIoLEAST32 · PRIoLEAST64 · PRIoMAX · PRIoPTR · PRIu8 · PRIu16 · PRIu32 · PRIu64 · PRIuFAST8 · PRIuFAST16 · PRIuFAST32 · PRIuFAST64 · PRIuLEAST8 · PRIuLEAST16 · PRIuLEAST32 · PRIuLEAST64 · PRIuMAX · PRIuPTR · PRIx8 · PRIx16 · PRIx32 · PRIx64 · PRIxFAST8 · PRIxFAST16 · PRIxFAST32 · PRIxFAST64 · PRIxLEAST8 · PRIxLEAST16 · PRIxLEAST32 · PRIxLEAST64 · PRIxMAX · PRIxPTR · PRIX8 · PRIX16 · PRIX32 · PRIX64 · PRIXFAST8 · PRIXFAST16 · PRIXFAST32 · PRIXFAST64 · PRIXLEAST8 · PRIXLEAST16 · PRIXLEAST32 · PRIXLEAST64 · PRIXMAX · PRIXPTR de>
de>SCNd8 · SCNd16 · SCNd32 · SCNd64 · SCNdFAST8 · SCNdFAST16 · SCNdFAST32 · SCNdFAST64 · SCNdLEAST8 · SCNdLEAST16 · SCNdLEAST32 · SCNdLEAST64 · SCNdMAX · SCNdPTR · SCNi8 · SCNi16 · SCNi32 · SCNi64 · SCNiFAST8 · SCNiFAST16 · SCNiFAST32 · SCNiFAST64 · SCNiLEAST8 · SCNiLEAST16 · SCNiLEAST32 · SCNiLEAST64 · SCNiMAX · SCNiPTR · SCNo8 · SCNo16 · SCNo32 · SCNo64 · SCNoFAST8 · SCNoFAST16 · SCNoFAST32 · SCNoFAST64 · SCNoLEAST8 · SCNoLEAST16 · SCNoLEAST32 · SCNoLEAST64 · SCNoMAX · SCNoPTR · SCNu8 · SCNu16 · SCNu32 · SCNu64 · SCNuFAST8 · SCNuFAST16 · SCNuFAST32 · SCNuFAST64 · SCNuLEAST8 · SCNuLEAST16 · SCNuLEAST32 · SCNuLEAST64 · SCNuMAX · SCNuPTR · SCNx8 · SCNx16 · SCNx32 · SCNx64 · SCNxFAST8 · SCNxFAST16 · SCNxFAST32 · SCNxFAST64 · SCNxLEAST8 · SCNxLEAST16 · SCNxLEAST32 · SCNxLEAST64 · SCNxMAX · SCNxPTR de>
Include the standard header de><inttypes.h>de> to include the standard header de><stdint.h>de> and to define a type, several functions, and numerous macros for fine control over the conversion of integers. Note that the definitions shown for the macros are merely representative -- they can vary among implementations.
/* TYPE DEFINITIONS */
typedef struct {
intmax_t quot, rem;
} imaxdiv_t;
/* FUNCTION DECLARATIONS */
intmax_t imaxabs(intmax_t i);
intmax_t abs(intmax_t i); [C++ only]
imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
imaxdiv_t div(intmax_t numer, intmax_t denom); [C++ only]
intmax_t strtoimax(const char *restrict s,
char **restrict endptr, int base);
uintmax_t strtoumax(const char *restrict s,
char **restrict endptr, int base);
intmax_t wcstoimax(const wchar_t *restrict s,
wchar_t **restrict endptr, int base);
uintmax_t wcstoumax(const wchar_t *restrict s,
wchar_t **restrict endptr, int base);
/* PRINT FORMAT MACROS */
#define PRId8 "hhd"
#define PRId16 "hd"
#define PRId32 "ld"
#define PRId64 "lld"
#define PRIdFAST8 "hhd"
#define PRIdFAST16 "hd"
#define PRIdFAST32 "ld"
#define PRIdFAST64 "lld"
#define PRIdLEAST8 "hhd"
#define PRIdLEAST16 "hd"
#define PRIdLEAST32 "ld"
#define PRIdLEAST64 "lld"
#define PRIdMAX "lld"
#define PRIdPTR "lld"
#define PRIi8 "hhi"
#define PRIi16 "hi"
#define PRIi32 "li"
#define PRIi64 "lli"
#define PRIiFAST8 "hhi"
#define PRIiFAST16 "hi"
#define PRIiFAST32 "li"
#define PRIiFAST64 "lli"
#define PRIiLEAST8 "hhi"
#define PRIiLEAST16 "hi"
#define PRIiLEAST32 "li"
#define PRIiLEAST64 "lli"
#define PRIiMAX "lli"
#define PRIiPTR "lli"
#define PRIo8 "hho"
#define PRIo16 "ho"
#define PRIo32 "lo"
#define PRIo64 "llo"
#define PRIoFAST8 "hho"
#define PRIoFAST16 "ho"
#define PRIoFAST32 "lo"
#define PRIoFAST64 "llo"
#define PRIoLEAST8 "hho"
#define PRIoLEAST16 "ho"
#define PRIoLEAST32 "lo"
#define PRIoLEAST64 "llo"
#define PRIoMAX "llo"
#define PRIoPTR "llo"
#define PRIu8 "hhu"
#define PRIu16 "hu"
#define PRIu32 "lu"
#define PRIu64 "llu"
#define PRIuFAST8 "hhu"
#define PRIuFAST16 "hu"
#define PRIuFAST32 "lu"
#define PRIuFAST64 "llu"
#define PRIuLEAST8 "hhu"
#define PRIuLEAST16 "hu"
#define PRIuLEAST32 "lu"
#define PRIuLEAST64 "llu"
#define PRIuMAX "llu"
#define PRIuPTR "llu"
#define PRIx8 "hhx"
#define PRIx16 "hx"
#define PRIx32 "lx"
#define PRIx64 "llx"
#define PRIxFAST8 "hhx"
#define PRIxFAST16 "hx"
#define PRIxFAST32 "lx"
#define PRIxFAST64 "llx"
#define PRIxLEAST8 "hhx"
#define PRIxLEAST16 "hx"
#define PRIxLEAST32 "lx"
#define PRIxLEAST64 "llx"
#define PRIxMAX "llx"
#define PRIxPTR "llx"
#define PRIX8 "hhX"
#define PRIX16 "hX"
#define PRIX32 "lX"
#define PRIX64 "llX"
#define PRIXFAST8 "hhX"
#define PRIXFAST16 "hX"
#define PRIXFAST32 "lX"
#define PRIXFAST64 "llX"
#define PRIXLEAST8 "hhX"
#define PRIXLEAST16 "hX"
#define PRIXLEAST32 "lX"
#define PRIXLEAST64 "llX"
#define PRIXMAX "llX"
#define PRIXPTR "llX"
/* SCAN FORMAT MACROS */
#define SCNd8 "hhd"
#define SCNd16 "hd"
#define SCNd32 "ld"
#define SCNd64 "lld"
#define SCNdFAST8 "hhd"
#define SCNdFAST16 "hd"
#define SCNdFAST32 "ld"
#define SCNdFAST64 "lld"
#define SCNdLEAST8 "hhd"
#define SCNdLEAST16 "hd"
#define SCNdLEAST32 "ld"
#define SCNdLEAST64 "lld"
#define SCNdMAX "lld"
#define SCNdPTR "lld"
#define SCNi8 "hhi"
#define SCNi16 "hi"
#define SCNi32 "li"
#define SCNi64 "lli"
#define SCNiFAST8 "hhi"
#define SCNiFAST16 "hi"
#define SCNiFAST32 "li"
#define SCNiFAST64 "lli"
#define SCNiLEAST8 "hhi"
#define SCNiLEAST16 "hi"
#define SCNiLEAST32 "li"
#define SCNiLEAST64 "lli"
#define SCNiMAX "lli"
#define SCNiPTR "lli"
#define SCNo8 "hho"
#define SCNo16 "ho"
#define SCNo32 "lo"
#define SCNo64 "llo"
#define SCNoFAST8 "hho"
#define SCNoFAST16 "ho"
#define SCNoFAST32 "lo"
#define SCNoFAST64 "llo"
#define SCNoLEAST8 "hho"
#define SCNoLEAST16 "ho"
#define SCNoLEAST32 "lo"
#define SCNoLEAST64 "llo"
#define SCNoMAX "llo"
#define SCNoPTR "llo"
#define SCNu8 "hhu"
#define SCNu16 "hu"
#define SCNu32 "lu"
#define SCNu64 "llu"
#define SCNuFAST8 "hhu"
#define SCNuFAST16 "hu"
#define SCNuFAST32 "lu"
#define SCNuFAST64 "llu"
#define SCNuLEAST8 "hhu"
#define SCNuLEAST16 "hu"
#define SCNuLEAST32 "lu"
#define SCNuLEAST64 "llu"
#define SCNuMAX "llu"
#define SCNuPTR "llu"
#define SCNx8 "hhx"
#define SCNx16 "hx"
#define SCNx32 "lx"
#define SCNx64 "llx"
#define SCNxFAST8 "hhx"
#define SCNxFAST16 "hx"
#define SCNxFAST32 "lx"
#define SCNxFAST64 "llx"
#define SCNxLEAST8 "hhx"
#define SCNxLEAST16 "hx"
#define SCNxLEAST32 "lx"
#define SCNxLEAST64 "llx"
#define SCNxMAX "llx"
#define SCNxPTR "llx"
intmax_t imaxabs(intmax_t i);
intmax_t abs(intmax_t i); [C++ only]
The function returns the absolute value of de>ide>, de>|i|de>.
imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
imaxdiv_t div(intmax_t numer, intmax_t denom); [C++ only]
The function divides de>numerde> by de>denomde> and returns both quotient and remainder in the structure result de>xde>, if the quotient can be represented. The structure member de>x.quotde> is the algebraic quotient truncated toward zero. The structure member de>x.remde> is the remainder, such that de>numer == x.quot*denom + x.remde>.
typedef struct {
intmax_t quot, rem;
} imaxdiv_t;
The type is the structure type returned by the function de>imaxdivde>. The structure contains members that represent the quotient (de>quotde>) and remainder (de>remde>) of a signed integer division with operands of type intmax_t. The members shown above can occur in either order.
#define PRId8 "hhd"
#define PRId16 "hd"
#define PRId32 "ld"
#define PRId64 "lld"
The macros each expand to a string literal suitable for use as a de>dde> print conversion specificier, plus any needed qualifiers, to convert values of the types de>int8_tde>, de>int16_tde>, de>int32_tde>, or de>int64_tde>, respectively. Note that the definitions shown here are merely representative.
#define PRIdFAST8 "hhd"
#define PRIdFAST16 "hd"
#define PRIdFAST32 "ld"
#define PRIdFAST64 "lld"
The macros each expand to a string literal suitable for use as a de>dde> print conversion specificier, plus any needed qualifiers, to convert values of the types de>int_fast8_tde>, de>int_fast16_tde>, de>int_fast32_tde>, or de>int_fast64_tde>, respectively. Note that the definitions shown here are merely representative.
#define PRIdLEAST8 "hhd"
#define PRIdLEAST16 "hd"
#define PRIdLEAST32 "ld"
#define PRIdLEAST64 "lld"
The macros each expand to a string literal suitable for use as a de>dde> print conversion specificier, plus any needed qualifiers, to convert values of the types de>int_least8_tde>, de>int_least16_tde>, de>int_least32_tde>, or de>int_least64_tde>, respectively. Note that the definitions shown here are merely representative.
#define PRIdMAX "lld"
The macro expands to a string literal suitable for use as a de>dde> print conversion specificier, plus any needed qualifiers, to convert values of the types de>intmax_tde>. Note that the definition shown here is merely representative.
#define PRIdPTR "lld"
The macro expands to a string literal suitable for use as a de>dde> print conversion specificier, plus any needed qualifiers, to convert values of the types de>intptr_tde>. Note that the definition shown here is merely representative.
#define PRIi8 "hhi"
#define PRIi16 "hi"
#define PRIi32 "li"
#define PRIi64 "lli"
The macros each expand to a string literal suitable for use as an de>ide> print conversion specificier, plus any needed qualifiers, to convert values of the types de>int8_tde>, de>int16_tde>, de>int32_tde>, or de>int64_tde>, respectively. Note that the definitions shown here are merely representative.
#define PRIiFAST8 "hhi"
#define PRIiFAST16 "hi"
#define PRIiFAST32 "li"
#define PRIiFAST64 "lli"
The macros each expand to a string literal suitable for use as an de>ide> print conversion specificier, plus any needed qualifiers, to convert values of the types de>int_fast8_tde>, de>int_fast16_tde>, de>int_fast32_tde>, or de>int_fast64_tde>, respectively. Note that the definitions shown here are merely representative.
#define PRIiLEAST8 "hhi"
#define PRIiLEAST16 "hi"
#define PRIiLEAST32 "li"
#define PRIiLEAST64 "lli"
The macros each expand to a string literal suitable for use as an de>ide> print conversion specificier, plus any needed qualifiers, to convert values of the types de>int_least8_tde>, de>int_least16_tde>, de>int_least32_tde>, or de>int_least64_tde>, respectively. Note that the definitions shown here are merely representative.
#define PRIiMAX "lli"
The macro expands to a string literal suitable for use as an de>ide> print conversion specificier, plus any needed qualifiers, to convert values of the types de>intmax_tde>. Note that the definition shown here is merely representative.
#define PRIiPTR "lli"
The macro expands to a string literal suitable for use as an de>ide> print conversion specificier, plus any needed qualifiers, to convert values of the types de>intptr_tde>. Note that the definition shown here is merely representative.
#define PRIo8 "hho"
#define PRIo16 "ho"
#define PRIo32 "lo"
#define PRIo64 "llo"
The macros each expand to a string literal suitable for use as an de>ode> print conversion specificier, plus any needed qualifiers, to convert values of the types de>uint8_tde>, de>uint16_tde>, de>uint32_tde>, or de>uint64_tde>, respectively. Note that the definitions shown here are merely representative.
#define PRIoFAST8 "hho"
#define PRIoFAST16 "ho"
#define PRIoFAST32 "lo"
#define PRIoFAST64 "llo"
The macros each expand to a string literal suitable for use as an de>ode> print conversion specificier, plus any needed qualifiers, to convert values of the types de>uint_fast8_tde>, de>uint_fast16_tde>, de>uint_fast32_tde>, or de>uint_fast64_tde>, respectively. Note that the definitions shown here are merely representative.
#define PRIoLEAST8 "hho"
#define PRIoLEAST16 "ho"
#define PRIoLEAST32 "lo"
#define PRIoLEAST64 "llo"
The macros each expand to a string literal suitable for use as an de>ode> print conversion specificier, plus any needed qualifiers, to convert values of the types de>uint_least8_tde>, de>uint_least16_tde>, de>uint_least32_tde>, or de>uint_least64_tde>, respectively. Note that the definitions shown here are merely representative.
#define PRIoMAX "llo"
The macro expands to a string literal suitable for use as an de>ode> print conversion specificier, plus any needed qualifiers, to convert values of the types de>uintmax_tde>. Note that the definition shown here is merely representative.
#define PRIoPTR "llo"
The macro expands to a string literal suitable for use as an de>ode> print conversion specificier, plus any needed qualifiers, to convert values of the types de>uintptr_tde>. Note that the definition shown here is merely representative.
#define PRIu8 "hhu"
#define PRIu16 "hu"
#define PRIu32 "lu"
#define PRIu64 "llu"
The macros each expand to a string literal suitable for use as a de>ude> print conversion specificier, plus any needed qualifiers, to convert values of the types de>uint8_tde>, de>uint16_tde>, de>uint32_tde>, or de>uint64_tde>, respectively. Note that the definitions shown here are merely representative.
#define PRIuFAST8 "hhu"
#define PRIuFAST16 "hu"
#define PRIuFAST32 "lu"
#define PRIuFAST64 "llu"
The macros each expand to a string literal suitable for use as a de>ude> print conversion specificier, plus any needed qualifiers, to convert values of the types de>uint_fast8_tde>, de>uint_fast16_tde>, de>uint_fast32_tde>, or de>uint_fast64_tde>, respectively. Note that the definitions shown here are merely representative.
#define PRIuLEAST8 "hhu"
#define PRIuLEAST16 "hu"
#define PRIuLEAST32 "lu"
#define PRIuLEAST64 "llu"
The macros each expand to a string literal suitable for use as a de>ude> print conversion specificier, plus any needed qualifiers, to convert values of the types de>uint_least8_tde>, de>uint_least16_tde>, de>uint_least32_tde>, or de>uint_least64_tde>, respectively. Note that the definitions shown here are merely representative.
#define PRIuMAX "llu"
The macro expands to a string literal suitable for use as a de>ude> print conversion specificier, plus any needed qualifiers, to convert values of the types de>uintmax_tde>. Note that the definition shown here is merely representative.
#define PRIuPTR "llu"
The macro expands to a string literal suitable for use as a de>ude> print conversion specificier, plus any needed qualifiers, to convert values of the types de>uintptr_tde>. Note that the definition shown here is merely representative.
#define PRIx8 "hhx"
#define PRIx16 "hx"
#define PRIx32 "lx"
#define PRIx64 "llx"
The macros each expand to a string literal suitable for use as an de>xde> print conversion specificier, plus any needed qualifiers, to convert values of the types de>uint8_tde>, de>uint16_tde>, de>uint32_tde>, or de>uint64_tde>, respectively. Note that the definitions shown here are merely representative.
#define PRIxFAST8 "hhx"
#define PRIxFAST16 "hx"
#define PRIxFAST32 "lx"
#define PRIxFAST64 "llx"
The macros each expand to a string literal suitable for use as an de>xde> print conversion specificier, plus any needed qualifiers, to convert values of the types de>uint_fast8_tde>, de>uint_fast16_tde>, de>uint_fast32_tde>, or de>uint_fast64_tde>, respectively. Note that the definitions shown here are merely representative.
#define PRIxLEAST8 "hhx"
#define PRIxLEAST16 "hx"
#define PRIxLEAST32 "lx"
#define PRIxLEAST64 "llx"
The macros each expand to a string literal suitable for use as an de>xde> print conversion specificier, plus any needed qualifiers, to convert values of the types de>uint_least8_tde>, de>uint_least16_tde>, de>uint_least32_tde>, or de>uint_least64_tde>, respectively. Note that the definitions shown here are merely representative.
#define PRIxMAX "llx"
The macro expands to a string literal suitable for use as an de>xde> print conversion specificier, plus any needed qualifiers, to convert values of the types de>uintmax_tde>. Note that the definition shown here is merely representative.
#define PRIxPTR "llx"
The macro expands to a string literal suitable for use as an de>xde> print conversion specificier, plus any needed qualifiers, to convert values of the types de>uintptr_tde>. Note that the definition shown here is merely representative.
#define PRIX8 "hhX"
#define PRIX16 "hX"
#define PRIX32 "lX"
#define PRIX64 "llX"
The macros each expand to a string literal suitable for use as an de>Xde> print conversion specificier, plus any needed qualifiers, to convert values of the types de>uint8_tde>, de>uint16_tde>, de>uint32_tde>, or de>uint64_tde>, respectively. Note that the definitions shown here are merely representative.
#define PRIXFAST8 "hhX"
#define PRIXFAST16 "hX"
#define PRIXFAST32 "lX"
#define PRIXFAST64 "llX"
The macros each expand to a string literal suitable for use as an de>Xde> print conversion specificier, plus any needed qualifiers, to convert values of the types de>uint_fast8_tde>, de>uint_fast16_tde>, de>uint_fast32_tde>, or de>uint_fast64_tde>, respectively. Note that the definitions shown here are merely representative.
#define PRIXLEAST8 "hhX"
#define PRIXLEAST16 "hX"
#define PRIXLEAST32 "lX"
#define PRIXLEAST64 "llX"
The macros each expand to a string literal suitable for use as an de>Xde> print conversion specificier, plus any needed qualifiers, to convert values of the types de>uint_least8_tde>, de>uint_least16_tde>, de>uint_least32_tde>, or de>uint_least64_tde>, respectively. Note that the definitions shown here are merely representative.
#define PRIXMAX "llX"
The macro expands to a string literal suitable for use as an de>Xde> print conversion specificier, plus any needed qualifiers, to convert values of the types de>uintmax_tde>. Note that the definition shown here is merely representative.
#define PRIXPTR "llX"
The macro expands to a string literal suitable for use as an de>Xde> print conversion specificier, plus any needed qualifiers, to convert values of the types de>uintptr_tde>. Note that the definition shown here is merely representative.
#define SCNd8 "hhd"
#define SCNd16 "hd"
#define SCNd32 "ld"
#define SCNd64 "lld"
The macros each expand to a string literal suitable for use as a de>dde> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>int8_tde>, de>int16_tde>, de>int32_tde>, or de>int64_tde>, respectively. Note that the definitions shown here are merely representative.
#define SCNdFAST8 "hhd"
#define SCNdFAST16 "hd"
#define SCNdFAST32 "ld"
#define SCNdFAST64 "lld"
The macros each expand to a string literal suitable for use as a de>dde> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>int_fast8_tde>, de>int_fast16_tde>, de>int_fast32_tde>, or de>int_fast64_tde>, respectively. Note that the definitions shown here are merely representative.
#define SCNdLEAST8 "hhd"
#define SCNdLEAST16 "hd"
#define SCNdLEAST32 "ld"
#define SCNdLEAST64 "lld"
The macros each expand to a string literal suitable for use as a de>dde> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>int_least8_tde>, de>int_least16_tde>, de>int_least32_tde>, or de>int_least64_tde>, respectively. Note that the definitions shown here are merely representative.
#define SCNdMAX "lld"
The macro expands to a string literal suitable for use as a de>dde> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>intmax_tde>. Note that the definition shown here is merely representative.
#define SCNdPTR "lld"
The macro expands to a string literal suitable for use as a de>dde> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>intptr_tde>. Note that the definition shown here is merely representative.
#define SCNi8 "hhi"
#define SCNi16 "hi"
#define SCNi32 "li"
#define SCNi64 "lli"
The macros each expand to a string literal suitable for use as an de>ide> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>int8_tde>, de>int16_tde>, de>int32_tde>, or de>int64_tde>, respectively. Note that the definitions shown here are merely representative.
#define SCNiFAST8 "hhi"
#define SCNiFAST16 "hi"
#define SCNiFAST32 "li"
#define SCNiFAST64 "lli"
The macros each expand to a string literal suitable for use as an de>ide> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>int_fast8_tde>, de>int_fast16_tde>, de>int_fast32_tde>, or de>int_fast64_tde>, respectively. Note that the definitions shown here are merely representative.
#define SCNiLEAST8 "hhi"
#define SCNiLEAST16 "hi"
#define SCNiLEAST32 "li"
#define SCNiLEAST64 "lli"
The macros each expand to a string literal suitable for use as an de>ide> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>int_least8_tde>, de>int_least16_tde>, de>int_least32_tde>, or de>int_least64_tde>, respectively. Note that the definitions shown here are merely representative.
#define SCNiMAX "lli"
The macro expands to a string literal suitable for use as an de>ide> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>intmax_tde>. Note that the definition shown here is merely representative.
#define SCNiPTR "lli"
The macro expands to a string literal suitable for use as an de>ide> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>intptr_tde>. Note that the definition shown here is merely representative.
#define SCNo8 "hho"
#define SCNo16 "ho"
#define SCNo32 "lo"
#define SCNo64 "llo"
The macros each expand to a string literal suitable for use as an de>ode> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>uint8_tde>, de>uint16_tde>, de>uint32_tde>, or de>uint64_tde>, respectively. Note that the definitions shown here are merely representative.
#define SCNoFAST8 "hho"
#define SCNoFAST16 "ho"
#define SCNoFAST32 "lo"
#define SCNoFAST64 "llo"
The macros each expand to a string literal suitable for use as an de>ode> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>uint_fast8_tde>, de>uint_fast16_tde>, de>uint_fast32_tde>, or de>uint_fast64_tde>, respectively. Note that the definitions shown here are merely representative.
#define SCNoLEAST8 "hho"
#define SCNoLEAST16 "ho"
#define SCNoLEAST32 "lo"
#define SCNoLEAST64 "llo"
The macros each expand to a string literal suitable for use as an de>ode> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>uint_least8_tde>, de>uint_least16_tde>, de>uint_least32_tde>, or de>uint_least64_tde>, respectively. Note that the definitions shown here are merely representative.
#define SCNoMAX "llo"
The macro expands to a string literal suitable for use as an de>ode> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>uintmax_tde>. Note that the definition shown here is merely representative.
#define SCNoPTR "llo"
The macro expands to a string literal suitable for use as an de>ode> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>uintptr_tde>. Note that the definition shown here is merely representative.
#define SCNu8 "hhu"
#define SCNu16 "hu"
#define SCNu32 "lu"
#define SCNu64 "llu"
The macros each expand to a string literal suitable for use as a de>ude> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>uint8_tde>, de>uint16_tde>, de>uint32_tde>, or de>uint64_tde>, respectively. Note that the definitions shown here are merely representative.
#define SCNuFAST8 "hhu"
#define SCNuFAST16 "hu"
#define SCNuFAST32 "lu"
#define SCNuFAST64 "llu"
The macros each expand to a string literal suitable for use as a de>ude> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>uint_fast8_tde>, de>uint_fast16_tde>, de>uint_fast32_tde>, or de>uint_fast64_tde>, respectively. Note that the definitions shown here are merely representative.
#define SCNuLEAST8 "hhu"
#define SCNuLEAST16 "hu"
#define SCNuLEAST32 "lu"
#define SCNuLEAST64 "llu"
The macros each expand to a string literal suitable for use as a de>ude> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>uint_least8_tde>, de>uint_least16_tde>, de>uint_least32_tde>, or de>uint_least64_tde>, respectively. Note that the definitions shown here are merely representative.
#define SCNuMAX "llu"
The macro expands to a string literal suitable for use as a de>ude> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>uintmax_tde>. Note that the definition shown here is merely representative.
#define SCNuPTR "llu"
The macro expands to a string literal suitable for use as a de>ude> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>uintptr_tde>. Note that the definition shown here is merely representative.
#define SCNx8 "hhx"
#define SCNx16 "hx"
#define SCNx32 "lx"
#define SCNx64 "llx"
The macros each expand to a string literal suitable for use as an de>xde> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>uint8_tde>, de>uint16_tde>, de>uint32_tde>, or de>uint64_tde>, respectively. Note that the definitions shown here are merely representative.
#define SCNxFAST8 "hhx"
#define SCNxFAST16 "hx"
#define SCNxFAST32 "lx"
#define SCNxFAST64 "llx"
The macros each expand to a string literal suitable for use as an de>xde> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>uint_fast8_tde>, de>uint_fast16_tde>, de>uint_fast32_tde>, or de>uint_fast64_tde>, respectively. Note that the definitions shown here are merely representative.
#define SCNxLEAST8 "hhx"
#define SCNxLEAST16 "hx"
#define SCNxLEAST32 "lx"
#define SCNxLEAST64 "llx"
The macros each expand to a string literal suitable for use as an de>xde> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>uint_least8_tde>, de>uint_least16_tde>, de>uint_least32_tde>, or de>uint_least64_tde>, respectively. Note that the definitions shown here are merely representative.
#define SCNxMAX "llx"
The macro expands to a string literal suitable for use as an de>xde> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>uintmax_tde>. Note that the definition shown here is merely representative.
#define SCNxPTR "llx"
The macro expands to a string literal suitable for use as an de>xde> scan conversion specificier, plus any needed qualifiers, to convert values of the types de>uintptr_tde>. Note that the definition shown here is merely representative.
intmax_t strtoimax(const char *restrict s, char **restrict endptr,
int base);
The function converts the initial characters of the string de>sde> to an equivalent value de>xde> of type intmax_t. If de>endptrde> is not a null pointer, it stores a pointer to the unconverted remainder of the string in de>*endptrde>. The function then returns de>xde>. de>strtoimaxde> converts strings exactly as does de>strtolde>.
If the string de>sde> does not match a valid pattern, the value stored in de>*endptrde> is de>sde>, and de>xde> is zero. If the equivalent value is too large to represent as type intmax_t, de>strtoimaxde> stores the value of de>ERANGEde> in de>errnode> and returns either de>INTMAX_MAXde>, if de>xde> is positive, or de>INTMAX_MINde>, if de>xde> is negative.
uintmax_t strtoumax(const char *restrict s, char **restrict endptr,
int base);
The function converts the initial characters of the string de>sde> to an equivalent value de>xde> of type uintmax_t. If de>endptrde> is not a null pointer, it stores a pointer to the unconverted remainder of the string in de>*endptrde>. The function then returns de>xde>. de>strtoumaxde> converts strings exactly as does de>strtoulde>.
If the string de>sde> does not match a valid pattern, the value stored in de>*endptrde> is de>sde>, and de>xde> is zero. If the equivalent value is too large to represent as type uintmax_t, de>strtoumaxde> stores the value of de>ERANGEde> in de>errnode> and returns de>UINTMAX_MAXde>.
intmax_t wcstimax(const wchar_t *restrict s, wchar_t **restrict endptr,
int base);
The function converts the initial wide characters of the wide string de>sde> to an equivalent value de>xde> of type intmax_t. If de>endptrde> is not a null pointer, the function stores a pointer to the unconverted remainder of the wide string in de>*endptrde>. The function then returns de>xde>.
The initial wide characters of the wide string de>sde> must match the same pattern as recognized by the function de>strtolde>, with the same de>basede> argument, where each wide character de>wcde> is converted as if by calling de>wctob(wc))de>.
If the wide string de>sde> matches this pattern, de>wcstoimaxde> converts strings exactly as does de>strtolde>, with the same de>basede> argument, for the converted sequence. If the wide string de>sde> does not match a valid pattern, the value stored in de>*endptrde> is de>sde>, and de>xde> is zero. If the equivalent value is too large in magnitude to represent as type intmax_t, de>wcstoimaxde> stores the value of de>ERANGEde> in de>errnode> and returns either de>INTMAX_MAXde>, if de>xde> is positive, or de>INTMAX_MINde>, if de>xde> is negative.
uintmax_t wcstoumax(const wchar_t *restrict s,
wchar_t **restrict endptr, int base);
The function converts the initial wide characters of the wide string de>sde> to an equivalent value de>xde> of type uintmax_t. If de>endptrde> is not a null pointer, the function stores a pointer to the unconverted remainder of the wide string in de>*endptrde>. The function then returns de>xde>.
The initial wide characters of the wide string de>sde> must match the same pattern as recognized by the function de>strtolde>, with the same de>basede> argument, where each wide character de>wcde> is converted as if by calling de>wctob(wc))de>.
If the wide string de>sde> matches this pattern, de>wcstoumaxde> converts strings exactly as does de>strtolde>, with the same de>basede> argument, for the converted sequence. If the wide string de>sde> does not match a valid pattern, the value stored in de>*endptrde> is de>sde>, and de>xde> is zero. If the equivalent value is too large to represent as type uintmax_t, de>wcstoimaxde> stores the value of de>ERANGEde> in de>errnode> and returns de>UINTMAX_MAXde>.
See also the Table of Contents and the Index.
Copyright ? 1992-2006 by P.J. Plauger. All rights reserved.
评论