Форматирование строки для CGI-запроса

Советы » CGI и Cookies » Форматирование строки для CGI-запроса

function

FormatStringforCGI(str: string

): string

; var

i: integer; begin

for

i := 1 to

Length(str) do

begin

if

str[i] in

['a'..'z', 'A'..'Z', '0', '1'..'9'] then

Result := Result + Str[i] else

if

Str[i] = ' ' then

Result := Result + '+' else

Result := Result + '%' + IntToHex(Byte(Str[i]), 2); end

; end

;

Другое по теме:

Категории

Статьи

Советы

Copyright © 2023 - All Rights Reserved - www.delphirus.com