Standard URL encode function?

后端 未结 13 1844
轻奢々
轻奢々 2020-11-30 05:33

Is there a Delphi equivalent of this .net\'s method:

Url.UrlEncode()

Note
I haven\'t worked with Delphi for several years now. As I

13条回答
  •  情深已故
    2020-11-30 05:54

    Look at indy IdURI unit, it has two static methods in the TIdURI class for Encode/Decode the URL.

    uses
      IdURI;
    
    ..
    begin
      S := TIdURI.URLEncode(str);
    //
      S := TIdURI.URLDecode(str);
    end;
    

提交回复
热议问题