Query: numtos
OS: sunos
Section: 9f
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
stoi(9F) Kernel Functions for Drivers stoi(9F)NAMEstoi, numtos - convert between an integer and a decimal stringSYNOPSIS#include <sys/ddi.h> int stoi(char **str); void numtos(unsigned long num, char *s);INTERFACE LEVELSolaris DDI specific (Solaris DDI).PARAMETERSstr Pointer to a character string to be converted. num Decimal number to be converted to a character string. s Character buffer to hold converted decimal number.DESCRIPTIONstoi() stoi() returns the integer value of a string of decimal numeric characters beginning at **str. No overflow checking is done. *str is updated to point at the last character examined. numtos() numtos() converts a long into a null-terminated character string. No bounds checking is done. The caller must ensure there is enough space to hold the result.RETURN VALUESstoi() returns the integer value of the string str.CONTEXTstoi() can be called from user or interrupt context.SEE ALSOWriting Device DriversNOTESstoi() handles only positive integers; it does not handle leading minus signs. SunOS 5.10 3 Mar 1994 stoi(9F)