
02.10.2012, 16:29
|
 |
Let Me Show You
|
|
Регистрация: 30.04.2010
Адрес: Северодвинск
Сообщения: 5,426
Версия Delphi: 7, XE5
Репутация: 59586
|
|
см. к примеру в:
Код:
unit IdURI;
class function TIdURI.ParamsEncode(const ASrc: string): string;
var
i: Integer;
begin
Result := ''; {Do not Localize}
for i := 1 to Length(ASrc) do begin
if ASrc[i] = ' ' then begin {do not localize}
Result := Result + '+'; {do not localize}
end else if NOT (ASrc[i] in ['A'..'Z', 'a'..'z', '0'..'9']) then begin {do not localize}
Result := Result + '%' + IntToHex(Ord(ASrc[i]), 2); {do not localize}
end else begin
Result := Result + ASrc[i];
end;
end;
end;
__________________
Пишу программы за еду.
__________________
|