hedgewars/uUtils.pas
changeset 7028 0f60591f3a16
parent 7027 f264ad9d8965
child 7043 7c080e5ac8d0
equal deleted inserted replaced
7027:f264ad9d8965 7028:0f60591f3a16
    73 uses typinfo, Math, uConsts, uVariables, SysUtils;
    73 uses typinfo, Math, uConsts, uVariables, SysUtils;
    74 
    74 
    75 {$IFDEF DEBUGFILE}
    75 {$IFDEF DEBUGFILE}
    76 var f: textfile;
    76 var f: textfile;
    77 {$ENDIF}
    77 {$ENDIF}
       
    78 var CharArray: array[byte] of Char;
    78 
    79 
    79 // should this include "strtolower()" for the split string?
    80 // should this include "strtolower()" for the split string?
    80 procedure SplitBySpace(var a, b: shortstring);
    81 procedure SplitBySpace(var a, b: shortstring);
    81 var i, t: LongInt;
    82 var i, t: LongInt;
    82 begin
    83 begin
   257 
   258 
   258 byte(DecodeBase64[0]):= t - 1
   259 byte(DecodeBase64[0]):= t - 1
   259 end;
   260 end;
   260 
   261 
   261 
   262 
   262 var CharArray: array[byte] of Char;
       
   263 function Str2PChar(const s: shortstring): PChar;
   263 function Str2PChar(const s: shortstring): PChar;
   264 begin
   264 begin
   265 CharArray:= s;
   265 CharArray:= s;
   266 CharArray[Length(s)]:= #0;
   266 CharArray[Length(s)]:= #0;
   267 Str2PChar:= @CharArray
   267 Str2PChar:= @CharArray