hedgewars/uUtils.pas
changeset 14101 af203fb307a7
parent 14093 e54f9a85ccba
child 14913 444ed0622348
equal deleted inserted replaced
14100:a173557250a3 14101:af203fb307a7
   262 begin
   262 begin
   263 repeat
   263 repeat
   264     i:= Pos(e, a);
   264     i:= Pos(e, a);
   265     if (i > 1) and (a[i - 1] = '\') then
   265     if (i > 1) and (a[i - 1] = '\') then
   266         begin
   266         begin
   267         a[i]:= $1B; // ASCII ESC
   267         a[i]:= Char($1B); // ASCII ESC
   268         Delete(a, i - 1, 1);
   268         Delete(a, i - 1, 1);
   269         end
   269         end
   270     else
   270     else
   271         break;
   271         break;
   272 until (i <= 0);
   272 until (i <= 0);
   276 // e back into the string. e is a char chosen by you.
   276 // e back into the string. e is a char chosen by you.
   277 procedure UnEscapeCharA(var a: ansistring; e: char);
   277 procedure UnEscapeCharA(var a: ansistring; e: char);
   278 var i: LongInt;
   278 var i: LongInt;
   279 begin
   279 begin
   280 repeat
   280 repeat
   281     i:= Pos($1B, a); // ASCII ESC
   281     i:= Pos(Char($1B), a); // ASCII ESC
   282     if (i > 0) then
   282     if (i > 0) then
   283         begin
   283         begin
   284         a[i]:= e;
   284         a[i]:= e;
   285         end
   285         end
   286     else
   286     else