str2dec
 
Syntax


int str2dec (char *  stringPointer );

Description


str2dec returns the numeric value of the string pointed to by stringPointer.  The default conversion uses decimal, but it will convert hex values preceeded by 0x

Example

 while (1) {
  printStr("enter option:");
  getStr(instring, 100);
  inval = str2dec(instring);
  
  switch (inval) {
   case 1:
 ...
See also