You are not logged in.
Pages: 1
Hello.
I am trying to follow Sample 06 (Project06Server) then I came around UrlDecodeDouble. What does it do and the other UrlDecode* functions? What is done with the parameters? Sorry, can't find the answer in the docs (or don't understand).
TIA. jeffp
Offline
It may be used to directly extract an Url encoded parameter.
https://synopse.info/files/html/Synopse … #TITLE_343
Offline
Thank you for your reply, ab.
I have actually read the documentation entry for URLDecodeDouble.
But the explanation is not enough for me, sorry.
function UrlDecodeDouble(U: PUTF8Char; const Upper: RawUTF8; var Value: double; Next: PPUTF8Char=nil): boolean;
U = the URL passed
Upper = Upper of the target parameter? Why?
Value = stores the double value
Next = this is not obvious to me
I struggle to interpret the use of Next here.
Offline
Upper = Upper of the target parameter? Why?
Because it's faster, reduces the time spent in the lookup table comparing chars.
Next = this is not obvious to me
Moves the string char pointer to the next to be decoded value, this is again performance benefit so it doesn't have to re-scan the entire URL string every time you call UrlDecode functions.
Example:
URL : user=Peter&password=test
if UrlDecodeValue(U, 'USER=', LUser, @U) and UrlDecodeValue(U, 'PASSWORD=', LPassword) then
Last edited by pvn0 (2021-08-03 11:24:38)
Offline
If you are confused by those low-level methods, rather use the high-level Input methods of the request execution context.
Do you happen to have an example for that, please?
Offline
Pages: 1