Advertisement
Broihon

Untitled

Oct 14th, 2016
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ULONG SplitStringA(char * szString, char ** pOut, ULONG MaxCount, char Splitter)
  2. {
  3.     if (!pOut || !szString || !MaxCount)
  4.         return 0;
  5.  
  6.     while (*szString == Splitter)
  7.         ++szString;
  8.  
  9.     ULONG Ret = 0;
  10.     while (Ret < MaxCount && *szString)
  11.     {
  12.         pOut[Ret] = szString;
  13.         while (*szString && *szString != Splitter)
  14.             ++szString;
  15.  
  16.         while (*szString == Splitter)
  17.         {
  18.             *szString = 0;
  19.             ++szString;
  20.         }
  21.  
  22.         ++Ret;
  23.     }
  24.     return Ret;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement