SHARE
TWEET

Untitled

a guest Feb 21st, 2020 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. char* GetNumFromStr(char* tempBuff, int strSize, int i)
  2. {
  3.   static char numFromStr[1024];
  4.  
  5.   for (int i1 = i; ; i1++)
  6.   {
  7.     if (!isdigit(tempBuff[i1]))
  8.     {
  9.       return 0;
  10.     }
  11.  
  12.     static char singleNum[1024];
  13.     sprintf(singleNum, "%c", tempBuff[i1]);
  14.     strcat(numFromStr, singleNum);
  15.  
  16.     if (!isdigit(tempBuff[i1 + 1]))
  17.     {
  18.       return numFromStr;
  19.     }
  20.   }
  21.  
  22.   return 0;
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top