LabWindows/CVI

Content Type
Programming Language
Current manual
Table of Contents

strtoimax

strtoimax

intmax_t strtoimax (const char stringInput[], char **endPointer, int base);

Purpose

Converts the initial portion of a string to an intmax_t integer representation with a specified base. Whitespace characters at the beginning of the string are skipped. The conversion stops when the function reaches a character that cannot be part of the number. The function obtains a pointer to the unconverted part of the string.

Parameters

Input
Name Type Description
stringInput const char [] A pointer to the character sequence from which a conversion is made.
base int The value of the radix that is used to make the appropriate conversion. If the base is zero, the expected form of the subject sequence is that of an integer constant. If the value of the base is between 2 and 36, the expected form of the subject sequence is a sequence of letters and digits representing an integer.
Note Note  If the value of base is 16, the characters 0x or 0X can precede the sequence to be converted.
Output
Name Type Description
endPointer char * A pointer to the first character in stringInput that cannot be part of the number converted. If the subject sequence is empty or does not have the expected form, the value of stringInput is stored in the object pointed to by this parameter. Pass NULL if you do not need the remainder.

Return Value

Name Type Description
convertedValue intmax_t The converted value, if any. If no conversion is possible, the function returns zero. If the correct value is outside the range of representable values, strtoimax returns INTMAX_MAX or INTMAX_MIN, according to the sign of the value, and sets errno to ERANGE.

Additional Information

Library: ANSI C Library

Include file: ansi_c.h

LabWindows/CVI compatibility: LabWindows/CVI 2013 and later

Was this information helpful?

Previous

strtod

Next

strtok

Previous

strtod

Next

strtok