MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Kernel Functions for Drivers                             stoi(9F)



NAME
     stoi, numtos - convert between  an  integer  and  a  decimal
     string

SYNOPSIS
     #include 

     int stoi(char **str);


     void numtos(unsigned long num, char *s);


INTERFACE LEVEL
     Solaris DI specific (Solaris DI).

PARAMETERS
     str    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.


DESCRIPTION
  stoi()
     The stoi() function 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 char-
     acter examined.

  numtos()
     The numtos() function 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 VALUES
     The stoi() function returns the integer value of the  string
     str.

CONTEXT
     The stoi() function can be called from user,  interrupt,  or
     kernel context.

SEE ALSO
     Writing Device Drivers

NOTES
     The stoi() function handles only positive integers; it  does
     not handle leading minus signs.



SunOS 5.11          Last change: 16 Jan 2006                    1



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™