I was searching for a way to get the length of a string in batch. So I read the answer from jeb which contains some mysterios signs I dont't get.
He uses the pound sign (#) in the function strlen when retrieving the input string:
:strlen <resultVar> <stringVar>
(   
[...]
    set "s=!%~2!#"
[...]
)
Can someone explain what the pound sign means?
As far as I understand the !%~2! gives the second parameter from the call. But what is the # used for and why is the expression after SET enclosed in "?