swabbies_112156
Nimbostratus
Jan 09, 2013help with syntax for trim command
Hello.
I am trying to sort out the correct syntax for using the trim function to get rid of any whitespace at the end of value.
exsting code: set cmd [ URI::query [string tolower [HTTP::uri]] command ]
example uri that works correctly = /interface.asp?command=testfunction&uid=testuser1
this then sets "cmd" to "testfunction"
example uri tdoesn't work because of whitespace = /interface.asp?command=testfunction &uid=testuser1
this sets "cmd" to "testfunction%20" and causes issues.
Would this be the correct syntax? and would this cover requests that have 2 whitespaces in it or only 1?
set cmd [string trim [URI::query [string tolower [HTTP::uri]] " "] command ]
Thanks for your help.
Ben