Project

General

Profile

$max » History » Version 1

Per Amundsen, 09/19/2020 10:58 PM

1 1 Per Amundsen
_Added in 3.9_
2
3
*$max(<space delimited tokens>)*
4
*$max(<comma,delimited,tokens>)*
5
6
Returns the maximum 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
<space delimited tokens> - If only one parameter is defined, it's treated as a list of space delimited tokens.
15
<comma,delimited,tokens> - If multiple parameters is defined, it's treated as a list of comma separated tokens.
16
17
*Properties*
18
19
.text - Sorts tokens using the same text sorting rules used by [[$sorttok]] 'a' switch.
20
.textcs - Sorts tokens using the same text sorting rules used by [[$sorttokcs]] 'a' switch.
21
.nick - Sorts tokens using the same text sorting rules used by [[$sorttok]] 'c' switch.
22
23
*Example*
24
25
<pre>
26
//echo -ag $max(6 7 2 4 1)
27
//echo -ag $max(6,7,2,4,1)
28
29
//echo -ag $max(b B a A c C).text
30
//echo -ag $max(b,B,a,A,c,C).text
31
</pre>
32
33
_