Forum Discussion
Is 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 LTM version of tcl, as lindex is a tcl builtin.
- Samir_Jha_52506
Noctilucent
andlindex
are different function of tcl and can be used in different situation.getfield
-
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.
-
- Samir_Jha_52506
Noctilucent
andlindex
are different function of tcl and can be used in different situation.getfield
-
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
* 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