Decodes encoded strings included in URLs. See WebFormUrlEncode for more details about the encoding format.
WebAPI.bdh
WebFormUrlDecode( inout sString: string ): boolean;
true if the string could be decoded
false otherwise
Parameter | Description |
---|---|
sString | String variable to decode |
dcltrans transaction TWebFormUrlDecode var sPlain, sUrl : string; nUrlLen : number; begin sPlain := "http://www.testurl.com/demo[1]()"; write("plain: "); write(sPlain); writeln; nUrlLen := sizeof(sUrl); WebFormUrlEncode(sUrl, nUrlLen, sPlain); write("encoded: "); write(sUrl); writeln; WebFormUrlDecode(sUrl); write("decoded: "); write(sUrl); writeln; end TWebFormUrlDecode;
plain: http://www.testurl.com/demo[1]() encoded: http%3A//www.testurl.com/demo%5B1%5D%28%29 decoded: http://www.testurl.com/demo[1]()