# HG changeset patch # User Franz Glasner # Date 1724937089 -7200 # Node ID 5d43c68bd1e99d847bd6ca0fc6bf4a6c678a09da # Parent 1aa14a7d96dcc364c37468bb67ccf40a3dc22aa0 Style diff -r 1aa14a7d96dc -r 5d43c68bd1e9 share/local-bsdtools/array.sh --- a/share/local-bsdtools/array.sh Thu Aug 29 14:01:38 2024 +0200 +++ b/share/local-bsdtools/array.sh Thu Aug 29 15:11:29 2024 +0200 @@ -46,9 +46,9 @@ #: Create a new array #: #: Args: -#: $1 (str): The name of the array. -#: Must conform to shell variable naming conventions -#: $2... (optional): Optional initialization values +#: $1 (str): The name of the array. +#: Must conform to shell variable naming conventions +#: $2... (optional): Optional initialization values #: #: It is assumed that the array does not exist already. #: @@ -81,8 +81,8 @@ #: $1 (str): The name of the array. #: #: Output (stdout): -#: The number of elements of the array. -#: If the array does not exist the output is -1. +#: The number of elements of the array. +#: If the array does not exist the output is -1. #: array_length() { local _name @@ -138,11 +138,11 @@ #: Get an array value from a given index #: #: Args: -#: $1 (str): The name of the existing array -#: $2 (int): The index +#: $1 (str): The name of the existing array +#: $2 (int): The index #: #: Output (stdout): -#: The value at index $2. +#: The value at index $2. #: array_get() { local _name _index @@ -211,8 +211,8 @@ #: The iteration stops if the called function returns a falsy value. #: #: Args: -#: $1 (str): The name of an existing array. -#: $2 (str): The name of a function to be called with three arguments. +#: $1 (str): The name of an existing array. +#: $2 (str): The name of a function to be called with three arguments. #: array_for_each() { local _name _cb