Advertisement
Janilabo

explode

Dec 2nd, 2013
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.64 KB | None | 0 0
  1. {$loadlib pumbaa.dll}
  2.  
  3. var
  4.   s: string;
  5.   f: Integer;
  6.   t: TStringArray;
  7.  
  8. begin
  9.   ClearDebug;
  10.   f := OpenFile(ScriptPath + 'changelog.txt', False);
  11.   ReadFileString(f, s, FileSize(f));
  12.   CloseFile(f);
  13.   f := GetSystemTime;
  14.   t := pp_StrExplode2(#10, s);
  15.   WriteLn('NEW: ' + IntToStr(GetSystemTime - f) + ' ms. [' + IntToStr(Length(t)) + ']');
  16.   SetLength(t, 0);
  17.   t := pp_StrExplode(#10, s);
  18.   WriteLn('OLD: ' + IntToStr(GetSystemTime - f) + ' ms. [' + IntToStr(Length(t)) + ']');
  19.   SetLength(t, 0);
  20.   t := Explode(#10, s);
  21.   WriteLn('Simba: ' + IntToStr(GetSystemTime - f) + ' ms. [' + IntToStr(Length(t)) + ']');
  22.   SetLength(t, 0);
  23. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement