Advertisement
Guest User

Untitled

a guest
Jul 28th, 2013
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
D 0.59 KB | None | 0 0
  1.             ubyte stringAmount = buffer[propertyOffset];
  2.            
  3.             char* pBuf = cast(char*)&buffer[propertyOffset + 1];
  4.            
  5.             string[] strings = new string[stringAmount];
  6.            
  7.             foreach (i; 0..stringAmount)
  8.             {
  9.                
  10.                 ubyte strSize = *cast(ubyte*)pBuf;
  11.                 pBuf++;
  12.                
  13.                 string str = pBuf[0..strSize].idup;
  14.                 pBuf += strSize;
  15.                
  16.                 strings[i] = str;
  17.                
  18.             }
  19.            
  20.             return strings;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement