Explode() function?
#2

Код:
stock explode(aExplode[][], const sSource[], const sDelimiter[] = " ", iVertices = sizeof aExplode, iLength = sizeof aExplode[]) 
{ 
   new 
      iNode, 
      iPointer, 
      iPrevious = -1, 
      iDelimiter = strlen(sDelimiter); 

   while(iNode < iVertices) 
   { 
      iPointer = strfind(sSource, sDelimiter, false, iPointer); 

      if(iPointer == -1) 
      { 
         strmid(aExplode[iNode], sSource, iPrevious, strlen(sSource), iLength); 
         break; 
      } 
      else 
      { 
         strmid(aExplode[iNode], sSource, iPrevious, iPointer, iLength); 
      } 

      iPrevious = (iPointer += iDelimiter); 
      ++iNode; 
   } 

   return iPrevious; 
}
By westie
Reply


Messages In This Thread
Explode() function? - by xGoldenx - 11.01.2012, 17:15
Re: Explode() function? - by spedico - 11.01.2012, 17:20
Re: Explode() function? - by AndreT - 11.01.2012, 17:23

Forum Jump:


Users browsing this thread: 1 Guest(s)