hedgewars/uLocale.pas
changeset 13988 a04c86dc685f
parent 13903 5f819b90d479
child 14882 acb0526bf458
equal deleted inserted replaced
13987:c409af570f87 13988:a04c86dc685f
   157             6: curArg:= arg7;
   157             6: curArg:= arg7;
   158             7: curArg:= arg8;
   158             7: curArg:= arg8;
   159             8: curArg:= arg9;
   159             8: curArg:= arg9;
   160         end;
   160         end;
   161 
   161 
       
   162         repeat
   162         p:= Pos('%'+IntToStr(i+1), tempstr);
   163         p:= Pos('%'+IntToStr(i+1), tempstr);
   163         if (p = 0) then
   164         if (p <> 0) then
   164             break
       
   165         else
       
   166             begin
   165             begin
   167             delete(tempstr, p, 2);
   166             delete(tempstr, p, 2);
   168             insert(curArg, tempstr, p);
   167             insert(curArg, tempstr, p);
   169             end;
   168             end;
       
   169         until (p = 0);
   170     end;
   170     end;
   171 Format:= tempstr;
   171 Format:= tempstr;
   172 end;
   172 end;
   173 
   173 
   174 // Same as Format, but for ansistring
   174 // Same as Format, but for ansistring
   189             6: curArg:= arg7;
   189             6: curArg:= arg7;
   190             7: curArg:= arg8;
   190             7: curArg:= arg8;
   191             8: curArg:= arg9;
   191             8: curArg:= arg9;
   192         end;
   192         end;
   193 
   193 
       
   194         repeat
   194         p:= Pos('%'+IntToStr(i+1), tempstr);
   195         p:= Pos('%'+IntToStr(i+1), tempstr);
   195         if (p = 0) then
   196         if (p <> 0) then
   196             break
       
   197         else
       
   198             begin
   197             begin
   199             delete(tempstr, p, 2);
   198             delete(tempstr, p, 2);
   200             insert(curArg, tempstr, p);
   199             insert(curArg, tempstr, p);
   201             end;
   200             end;
       
   201         until (p = 0);
   202     end;
   202     end;
   203 FormatA:= tempstr;
   203 FormatA:= tempstr;
   204 end;
   204 end;
   205 
   205 
   206 // The following functions are just shortcuts of Format/FormatA, with fewer argument counts
   206 // The following functions are just shortcuts of Format/FormatA, with fewer argument counts