Forum Discussion
Deb_Allen_18
May 18, 2005Historic F5 Account
substr function with termination character
BIG-IP v 9.0.5
trying to optimize some rules, and using substr with a termination character doesn't seem to work...
It seems to re-init the system and I lose SSH c...
unRuleY_95363
May 20, 2005Historic F5 Account
No, you should not need to quote the /. In general, the only time you need to quote something is if it contains spaces.
However, I often find myself quoting strings to help remind me that it is a string literal vs. a Tcl command.
Also note that using braces {} often accomplishes the same effect as quoting, but with a subtle difference. Braces create a Tcl list, which when referred to as a complete entity appears the same as a quoted string. So, in the example below, the two forms are generally equivalent unless a particular command is expecting a list, then the latter form is required:
set bar "This is a string"
set foo {This is a list}
However, there is a subtle performance difference between the two. The list causes Tcl to allocate a list object containing each list element in its own a seperate object. So, though the intended result appears the same, the list form has a larger impact on performance.
Hope this helps.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
