Forum Discussion
wsanders_233261
Nimbostratus
Jul 06, 2018Is lindex deprecated?
I cannot find a reference to lindex in https://devcentral.f5.com/wiki/iRules.Functions.ashx. Is lindex deprecated in favor of getfield? Or does this document only cover functions specific to the F5 L...
Samir_Jha_52506
Noctilucent
Jul 06, 2018lindex and getfield are different function of tcl and can be used in different situation.
-
lindex: command treats list as a Tcl list and returns the index'th element from it (0 refers to the first element of the list). In extracting the element, lindex observes the same rules concerning braces and quotes and backslashes as the Tcl command interpreter; If index is negative or greater than or equal to the number of elements in value, then an empty string is returned.
-
getfield Splits a string on a character or string, and returns the string corresponding to the specific field. The field_number parameter is 1 indexed.
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