Documentation

stripq

Syntax: %stripq(s)

Removes the internal quotes from the string s. This is provided for backwards compatibility with older versions of TeSSH. In older versions, internal quotes passed to functions were automatically removed. In newer versions, only the outside quotes are removed. The %stripq function can be used to emulate the behavior of older versions of TeSSH.

Examples:

To show exactly what is passed to a function, the follow test function is created:

#FUNC test {%literal(%1)}

This will return the argument of the function exactly as passed without further parsing.

a=123
#SHOW @test("@a"@a"@a")


returns @a"@a"@a because the newer version treats this entire argument as a string, so no variable expansion is performed.

#SHOW @test(%stripq("@a"@a"@a"))

returns "@a123@a" where the internal quotes have been stripped, and since the internal section is not between quotes, the variable reference is expanded by the function call itself.

Add comment

Login or register to post comments