Answers for "decode url name by delphi"

0

decode url name by delphi

{   URLEncode    Encodes string to be suitable as an URL. (ie. replaces for example a space with %20)  Example:	myencodeURL:=URLEncode(myURL);}function URLEncode(s: string): string;var  i: integer;  source: PAnsiChar;begin  result := '';  source := pansichar(s);  for i := 1 to length(source) do    if not (source in ['A'..'Z', 'a'..'z', '0'..'9', '-', '_', '~', '.', ':', '/']) then      result := result + '%' + inttohex(ord(source), 2)    else      result := result + source;end;
Posted by: Guest on March-15-2021

Browse Popular Code Answers by Language