hedgewars/uConsole.pas
changeset 1850 a0332e79fdc9
parent 1821 6b6cf3389f92
child 1851 b3b07f16a70d
equal deleted inserted replaced
1849:2a989e5abda6 1850:a0332e79fdc9
    98 
    98 
    99 procedure SplitBySpace(var a, b: shortstring);
    99 procedure SplitBySpace(var a, b: shortstring);
   100 var i, t: LongInt;
   100 var i, t: LongInt;
   101 begin
   101 begin
   102 i:= Pos(' ', a);
   102 i:= Pos(' ', a);
   103 if i>0 then
   103 if i > 0 then
   104    begin
   104 	begin
   105    for t:= 1 to Pred(i) do
   105 	for t:= 1 to Pred(i) do
   106        if (a[t] >= 'A')and(a[t] <= 'Z') then Inc(a[t], 32);
   106 		if (a[t] >= 'A')and(a[t] <= 'Z') then Inc(a[t], 32);
   107    b:= copy(a, i + 1, Length(a) - i);
   107 	b:= copy(a, i + 1, Length(a) - i);
   108    while (b[0]<>#0) and (b[1]=#32) do Delete(b, 1, 1);
   108 	while (b[0] <> #0) do
   109    byte(a[0]):= Pred(i)
   109 		Delete(b, 1, 1);
   110    end else b:= '';
   110 	
       
   111 	byte(a[0]):= Pred(i)
       
   112 	end else b:= '';
   111 end;
   113 end;
   112 
   114 
   113 procedure WriteToConsole(s: shortstring);
   115 procedure WriteToConsole(s: shortstring);
   114 var Len: LongInt;
   116 var Len: LongInt;
   115 begin
   117 begin