Skip to content

Commit 59a111b

Browse files
authored
Clarify indexing behavior in list-nth function
Added note about indexing behavior for list-nth function. Signed-off-by: Hofi <hofione@gmail.com>
1 parent 9beead5 commit 59a111b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

doc/_admin-guide/110_Template_and_rewrite/000_Customize_message_format/007_Template_functions_of_syslog-ng.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,9 @@ $(list-concat ${list1} ${list2})
735735
the list index starts with zero, so (list-nth 1 ${list} ) returns the
736736
second element, and so on.
737737

738+
**NOTE:** Indexing starts at 0. If a negative index is used, it counts from the end of the list. If the specified index is not found, the function returns an empty string.
739+
{: .notice--info}
740+
738741
### $(list-tail)
739742

740743
| *Syntax:* | $(list-tail ${list} ) |

0 commit comments

Comments
 (0)