$min » History » Version 2
Per Amundsen, 02/23/2023 05:04 PM
| 1 | 1 | Per Amundsen | _Added in 3.9_ |
|---|---|---|---|
| 2 | |||
| 3 | *$min(<space delimited tokens>)* |
||
| 4 | *$min(<comma,delimited,tokens>)* |
||
| 5 | |||
| 6 | Returns the minimum value from a list of tokens. |
||
| 7 | |||
| 8 | By default it sorte tokens using the numeric sorting rules used by [[$sorttok]] 'n' switch. |
||
| 9 | |||
| 10 | _See also [[$sorttok]]._ |
||
| 11 | |||
| 12 | *Parameters* |
||
| 13 | |||
| 14 | 2 | Per Amundsen | table(ktable). |
| 15 | |*Parameter*|*Description*| |
||
| 16 | | <space delimited tokens> | If only one parameter is defined, it's treated as a list of space delimited tokens. | |
||
| 17 | | <comma,delimited,tokens> | If multiple parameters is defined, it's treated as a list of comma separated tokens. | |
||
| 18 | 1 | Per Amundsen | |
| 19 | *Properties* |
||
| 20 | |||
| 21 | 2 | Per Amundsen | table(ktable). |
| 22 | |*Property*|*Description*| |
||
| 23 | | .text | Sorts tokens using the same text sorting rules used by [[$sorttok]] 'a' switch. | |
||
| 24 | | .textcs | Sorts tokens using the same text sorting rules used by [[$sorttokcs]] 'a' switch. | |
||
| 25 | | .nick | Sorts tokens using the same text sorting rules used by [[$sorttok]] 'c' switch. | |
||
| 26 | 1 | Per Amundsen | |
| 27 | *Example* |
||
| 28 | |||
| 29 | <pre> |
||
| 30 | //echo -ag $min(6 7 2 4 1) |
||
| 31 | //echo -ag $min(6,7,2,4,1) |
||
| 32 | |||
| 33 | //echo -ag $min(b B a A c C).text |
||
| 34 | //echo -ag $min(b,B,a,A,c,C).text |
||
| 35 | </pre> |
||
| 36 | |||
| 37 | _ |