From 52d7e452f1ac15158a8f49e660311474a9e93f4a Mon Sep 17 00:00:00 2001 From: John Kerl Date: Mon, 13 Mar 2017 21:12:30 -0400 Subject: [PATCH] function-doc neaten --- .gitattributes | 2 + c/dsl/function_manager.c | 67 +- doc/content-for-reference-dsl.html | 488 +++++--- doc/mk-func-h2s.sh | 17 +- doc/reference-dsl.html | 1872 +++++++++++++++++++++++++--- 5 files changed, 2132 insertions(+), 314 deletions(-) diff --git a/.gitattributes b/.gitattributes index 7c7dcd241..d536bf20c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -10,6 +10,8 @@ out binary *.c text eol=lf *.h text eol=lf +*.sh text eol=lf +*.rb text eol=lf *.csv text eol=lf *.dat text eol=lf diff --git a/c/dsl/function_manager.c b/c/dsl/function_manager.c index ff0acc27d..70bf5523e 100644 --- a/c/dsl/function_manager.c +++ b/c/dsl/function_manager.c @@ -329,22 +329,36 @@ static function_lookup_t FUNCTION_LOOKUP_TABLE[] = { {FUNC_CLASS_TYPING, "is_present", 1,0, "True if field is present in input, false otherwise."}, {FUNC_CLASS_TYPING, "is_string", 1,0, "True if field is present with string (including empty-string) value"}, - {FUNC_CLASS_TYPING, "asserting_absent", 1,0, "Returns argument if it is absent in the input data, else throws an error."}, - {FUNC_CLASS_TYPING, "asserting_bool", 1,0, "Returns argument if it is present with boolean value, else throws an error."}, - {FUNC_CLASS_TYPING, "asserting_boolean", 1,0, "Returns argument if it is present with boolean value, else throws an error."}, - {FUNC_CLASS_TYPING, "asserting_empty", 1,0, "Returns argument if it is present in input with empty value, else throws an error."}, - {FUNC_CLASS_TYPING, "asserting_empty_map", 1,0, "Returns argument if it is a map with empty value, else throws an error."}, - {FUNC_CLASS_TYPING, "asserting_float", 1,0, "Returns argument if it is present with float value, else throws an error."}, - {FUNC_CLASS_TYPING, "asserting_int", 1,0, "Returns argument if it is present with int value, else throws an error."}, + {FUNC_CLASS_TYPING, "asserting_absent", 1,0, "Returns argument if it is absent in the input data, else\n" + "throws an error."}, + {FUNC_CLASS_TYPING, "asserting_bool", 1,0, "Returns argument if it is present with boolean value, else\n" + "throws an error."}, + {FUNC_CLASS_TYPING, "asserting_boolean", 1,0, "Returns argument if it is present with boolean value, else\n" + "throws an error."}, + {FUNC_CLASS_TYPING, "asserting_empty", 1,0, "Returns argument if it is present in input with empty value,\n" + "else throws an error."}, + {FUNC_CLASS_TYPING, "asserting_empty_map", 1,0, "Returns argument if it is a map with empty value, else\n" + "throws an error."}, + {FUNC_CLASS_TYPING, "asserting_float", 1,0, "Returns argument if it is present with float value, else\n" + "throws an error."}, + {FUNC_CLASS_TYPING, "asserting_int", 1,0, "Returns argument if it is present with int value, else\n" + "throws an error."}, {FUNC_CLASS_TYPING, "asserting_map", 1,0, "Returns argument if it is a map, else throws an error."}, - {FUNC_CLASS_TYPING, "asserting_nonempty_map", 1,0, "Returns argument if it is a non-empty map, else throws an error."}, - {FUNC_CLASS_TYPING, "asserting_not_empty", 1,0, "Returns argument if it is present in input with non-empty value, else throws an error."}, + {FUNC_CLASS_TYPING, "asserting_nonempty_map", 1,0, "Returns argument if it is a non-empty map, else throws\n" + "an error."}, + {FUNC_CLASS_TYPING, "asserting_not_empty", 1,0, "Returns argument if it is present in input with non-empty\n" + "value, else throws an error."}, {FUNC_CLASS_TYPING, "asserting_not_map", 1,0, "Returns argument if it is not a map, else throws an error."}, - {FUNC_CLASS_TYPING, "asserting_not_null", 1,0, "Returns argument if it is non-null (non-empty and non-absent), else throws an error."}, - {FUNC_CLASS_TYPING, "asserting_null", 1,0, "Returns argument if it is null (empty or absent), else throws an error."}, - {FUNC_CLASS_TYPING, "asserting_numeric", 1,0, "Returns argument if it is present with int or float value, else throws an error."}, - {FUNC_CLASS_TYPING, "asserting_present", 1,0, "Returns argument if it is present in input, else throws an error."}, - {FUNC_CLASS_TYPING, "asserting_string", 1,0, "Returns argument if it is present with string (including empty-string) value, else throws an error."}, + {FUNC_CLASS_TYPING, "asserting_not_null", 1,0, "Returns argument if it is non-null (non-empty and non-absent),\n" + "else throws an error."}, + {FUNC_CLASS_TYPING, "asserting_null", 1,0, "Returns argument if it is null (empty or absent), else throws\n" + "an error."}, + {FUNC_CLASS_TYPING, "asserting_numeric", 1,0, "Returns argument if it is present with int or float value,\n" + "else throws an error."}, + {FUNC_CLASS_TYPING, "asserting_present", 1,0, "Returns argument if it is present in input, else throws\n" + "an error."}, + {FUNC_CLASS_TYPING, "asserting_string", 1,0, "Returns argument if it is present with string (including\n" + "empty-string) value, else throws an error."}, {FUNC_CLASS_CONVERSION, "boolean", 1,0, "Convert int/float/bool/string to boolean."}, {FUNC_CLASS_CONVERSION, "float", 1,0, "Convert int/float/bool/string to float."}, @@ -359,18 +373,27 @@ static function_lookup_t FUNCTION_LOOKUP_TABLE[] = { "MT_STRING). For debug."}, {FUNC_CLASS_MAPS, "depth", 1,0, "Prints maximum depth of hashmap: ''. Scalars have depth 0."}, - {FUNC_CLASS_MAPS, "haskey", 2,0, "True/false if map has/hasn't key, e.g. 'haskey($*, \"a\")' or 'haskey(mymap, mykey)'. Error if 1st argument is not a map."}, + {FUNC_CLASS_MAPS, "haskey", 2,0, "True/false if map has/hasn't key, e.g. 'haskey($*, \"a\")' or\n" + "'haskey(mymap, mykey)'. Error if 1st argument is not a map."}, {FUNC_CLASS_MAPS, "joink", 2,0, "Makes string from map keys. E.g. 'joink($*, \",\")'."}, {FUNC_CLASS_MAPS, "joinkv", 3,0, "Makes string from map key-value pairs. E.g. 'joinkv(@v[2], \"=\", \",\")'"}, {FUNC_CLASS_MAPS, "joinv", 2,0, "Makes string from map keys. E.g. 'joinv(mymap, \",\")'."}, - {FUNC_CLASS_MAPS, "leafcount", 1,0, "Counts total number of terminal values in hashmap. For single-level maps, same as length."}, + {FUNC_CLASS_MAPS, "leafcount", 1,0, "Counts total number of terminal values in hashmap. For single-level maps,\n" + "same as length."}, {FUNC_CLASS_MAPS, "length", 1,0, "Counts number of top-level entries in hashmap. Scalars have length 1."}, - {FUNC_CLASS_MAPS, "mapdiff", 0,1, "With 0 args, returns empty map. With 1 arg, returns copy of arg. With 2 or more, returns copy of arg 1 with all keys from any of remaining argument maps removed."}, - {FUNC_CLASS_MAPS, "mapsum", 0,1, "With 0 args, returns empty map. With >= 1 arg, returns a map with key-value pairs from all arguments. Rightmost collisions win, e.g. 'mapsum({1:2,3,4},{1:5})' is '{1:5,3:4}'."}, - {FUNC_CLASS_MAPS, "splitkv", 3,0, "Splits string by separators into map with type inference. E.g. 'splitkv(\"a=1,b=2,c=3\", \"=\", \",\")' gives '{\"a\" : 1, \"b\" : 2, \"c\" : 3}'."}, - {FUNC_CLASS_MAPS, "splitkvx", 3,0, "Splits string by separators into map without type inference (keys and values are strings). E.g. 'splitkv(\"a=1,b=2,c=3\", \"=\", \",\")' gives '{\"a\" : \"1\", \"b\" : \"2\", \"c\" : \"3\"}'."}, - {FUNC_CLASS_MAPS, "splitnv", 2,0, "Splits string by separator into integer-indexed map with type inference. E.g. 'splitnv(\"a,b,c\" , \",\")' gives '{1 : \"a\", 2 : \"b\", 3 : \"c\"}'."}, - {FUNC_CLASS_MAPS, "splitnvx", 2,0, "Splits string by separator into integer-indexed map without type inference (values are strings). E.g. 'splitnv(\"4,5,6\" , \",\")' gives '{1 : \"4\", 2 : \"5\", 3 : \"6\"}'."}, + {FUNC_CLASS_MAPS, "mapdiff", 0,1, "With 0 args, returns empty map. With 1 arg, returns copy of arg.\n" + "With 2 or more, returns copy of arg 1 with all keys from any of remaining argument maps removed."}, + {FUNC_CLASS_MAPS, "mapsum", 0,1, "With 0 args, returns empty map. With >= 1 arg, returns a map with\n" + "key-value pairs from all arguments. Rightmost collisions win, e.g. 'mapsum({1:2,3,4},{1:5})' is '{1:5,3:4}'."}, + {FUNC_CLASS_MAPS, "splitkv", 3,0, "Splits string by separators into map with type inference.\n" + "E.g. 'splitkv(\"a=1,b=2,c=3\", \"=\", \",\")' gives '{\"a\" : 1, \"b\" : 2, \"c\" : 3}'."}, + {FUNC_CLASS_MAPS, "splitkvx", 3,0, "Splits string by separators into map without type inference (keys and\n" + "values are strings). E.g. 'splitkv(\"a=1,b=2,c=3\", \"=\", \",\")' gives\n" + "'{\"a\" : \"1\", \"b\" : \"2\", \"c\" : \"3\"}'."}, + {FUNC_CLASS_MAPS, "splitnv", 2,0, "Splits string by separator into integer-indexed map with type inference.\n" + "E.g. 'splitnv(\"a,b,c\" , \",\")' gives '{1 : \"a\", 2 : \"b\", 3 : \"c\"}'."}, + {FUNC_CLASS_MAPS, "splitnvx", 2,0, "Splits string by separator into integer-indexed map without type\n" + "inference (values are strings). E.g. 'splitnv(\"4,5,6\" , \",\")' gives '{1 : \"4\", 2 : \"5\", 3 : \"6\"}'."}, {0, NULL, -1 , -1, NULL}, // table terminator }; diff --git a/doc/content-for-reference-dsl.html b/doc/content-for-reference-dsl.html index fe5d4baf4..56807c5fe 100644 --- a/doc/content-for-reference-dsl.html +++ b/doc/content-for-reference-dsl.html @@ -1218,43 +1218,267 @@ reference.

You can get a list of all functions using mlr -F. -

Operators

+ +

+

+ +

-+
-+
--
--
-*
-/
-//
-%
-**
-|
-^
-&
-~
-<<
->>
-==
-!=
-=~
-!=~
->
->=
-<
-<=
-&&
-||
-^^
-!
-? :
-.
++ (class=arithmetic #args=2): Addition.
++ (class=arithmetic #args=1): Unary plus.
+
+
+ +

-

+ +

+

+
+- (class=arithmetic #args=2): Subtraction.
+- (class=arithmetic #args=1): Unary minus.
+
+
+ +

*

+ +

+

+
+* (class=arithmetic #args=2): Multiplication.
+
+
+ +

/

+ +

+

+
+/ (class=arithmetic #args=2): Division.
+
+
+ +

//

+ +

+

+
+// (class=arithmetic #args=2): Integer division: rounds to negative (pythonic).
+
+
+ +

%

+ +

+

+
+% (class=arithmetic #args=2): Remainder; never negative-valued (pythonic).
+
+
+ +

**

+ +

+

+
+** (class=arithmetic #args=2): Exponentiation; same as pow, but as an infix
+operator.
+
+
+ +

|

+ +

+

+
+| (class=arithmetic #args=2): Bitwise OR.
+
+
+ +

^

+ +

+

+
+^ (class=arithmetic #args=2): Bitwise XOR.
+
+
+ +

&

+ +

+

+
+& (class=arithmetic #args=2): Bitwise AND.
+
+
+ +

~

+ +

+

+
+~ (class=arithmetic #args=1): Bitwise NOT. Beware '$y=~$x' since =~ is the
+regex-match operator: try '$y = ~$x'.
+
+
+ +

<<

+ +

+

+
+<< (class=arithmetic #args=2): Bitwise left-shift.
+
+
+ +

>>

+ +

+

+
+>> (class=arithmetic #args=2): Bitwise right-shift.
+
+
+ +

==

+ +

+

+
+== (class=boolean #args=2): String/numeric equality. Mixing number and string
+results in string compare.
+
+
+ +

!=

+ +

+

+
+!= (class=boolean #args=2): String/numeric inequality. Mixing number and string
+results in string compare.
+
+
+ +

=~

+ +

+

+
+=~ (class=boolean #args=2): String (left-hand side) matches regex (right-hand
+side), e.g. '$name =~ "^a.*b$"'.
+
+
+ +

!=~

+ +

+

+
+!=~ (class=boolean #args=2): String (left-hand side) does not match regex
+(right-hand side), e.g. '$name !=~ "^a.*b$"'.
+
+
+ +

>

+ +

+

+
+> (class=boolean #args=2): String/numeric greater-than. Mixing number and string
+results in string compare.
+
+
+ +

>=

+ +

+

+
+>= (class=boolean #args=2): String/numeric greater-than-or-equals. Mixing number
+and string results in string compare.
+
+
+ +

<

+ +

+

+
+< (class=boolean #args=2): String/numeric less-than. Mixing number and string
+results in string compare.
+
+
+ +

<=

+ +

+

+
+<= (class=boolean #args=2): String/numeric less-than-or-equals. Mixing number
+and string results in string compare.
+
+
+ +

&&

+ +

+

+
+&& (class=boolean #args=2): Logical AND.
+
+
+ +

||

+ +

+

+
+|| (class=boolean #args=2): Logical OR.
+
+
+ +

^^

+ +

+

+
+^^ (class=boolean #args=2): Logical XOR.
+
+
+ +

!

+ +

+

+
+! (class=boolean #args=1): Logical negation.
+
+
+ +

? :

+ +

+

+
+? : (class=boolean #args=3): Ternary operator.
+
+
+ +

.

+ +

+

+
+. (class=string #args=2): String concatenation.
 
-

abs

@@ -1305,8 +1529,8 @@ asinh (class=math #args=1): Inverse hyperbolic sine.

-asserting_absent (class=typing #args=1): Returns argument if it is absent in the
-input ata, else throws an error.
+asserting_absent (class=typing #args=1): Returns argument if it is absent in the input data, else
+throws an error.
 
@@ -1315,8 +1539,8 @@ input ata, else throws an error.

-asserting_bool (class=typing #args=1): Returns argument if it is present with
-boolean value, else throws an error.
+asserting_bool (class=typing #args=1): Returns argument if it is present with boolean value, else
+throws an error.
 
@@ -1325,8 +1549,8 @@ boolean value, else throws an error.

-asserting_boolean (class=typing #args=1): Returns argument if it is present with
-boolean value, else throws an error.
+asserting_boolean (class=typing #args=1): Returns argument if it is present with boolean value, else
+throws an error.
 
@@ -1335,8 +1559,8 @@ boolean value, else throws an error.

-asserting_empty (class=typing #args=1): Returns argument if it is present in
-input with empty value, else throws an error.
+asserting_empty (class=typing #args=1): Returns argument if it is present in input with empty value,
+else throws an error.
 
@@ -1345,8 +1569,8 @@ input with empty value, else throws an error.

-asserting_empty_map (class=typing #args=1): Returns argument if it is a map with
-empty value, else throws an error.
+asserting_empty_map (class=typing #args=1): Returns argument if it is a map with empty value, else
+throws an error.
 
@@ -1355,8 +1579,8 @@ empty value, else throws an error.

-asserting_float (class=typing #args=1): Returns argument if it is present with
-float value, else throws an error.
+asserting_float (class=typing #args=1): Returns argument if it is present with float value, else
+throws an error.
 
@@ -1365,8 +1589,8 @@ float value, else throws an error.

-asserting_int (class=typing #args=1): Returns argument if it is present with int
-value, else throws an error.
+asserting_int (class=typing #args=1): Returns argument if it is present with int value, else
+throws an error.
 
@@ -1375,8 +1599,7 @@ value, else throws an error.

-asserting_map (class=typing #args=1): Returns argument if it is a map, else
-throws an error.
+asserting_map (class=typing #args=1): Returns argument if it is a map, else throws an error.
 
@@ -1385,8 +1608,8 @@ throws an error.

-asserting_nonempty_map (class=typing #args=1): Returns argument if it is a
-non-empty map, else throws an error.
+asserting_nonempty_map (class=typing #args=1): Returns argument if it is a non-empty map, else throws
+an error.
 
@@ -1395,8 +1618,8 @@ non-empty map, else throws an error.

-asserting_not_empty (class=typing #args=1): Returns argument if it is present in
-input with non-empty value, else throws an error.
+asserting_not_empty (class=typing #args=1): Returns argument if it is present in input with non-empty
+value, else throws an error.
 
@@ -1405,8 +1628,7 @@ input with non-empty value, else throws an error.

-asserting_not_map (class=typing #args=1): Returns argument if it is not a map,
-else throws an error.
+asserting_not_map (class=typing #args=1): Returns argument if it is not a map, else throws an error.
 
@@ -1415,8 +1637,8 @@ else throws an error.

-asserting_not_null (class=typing #args=1): Returns argument if it is non-null
-(non-empty and non-absent), else throws an error.
+asserting_not_null (class=typing #args=1): Returns argument if it is non-null (non-empty and non-absent),
+else throws an error.
 
@@ -1425,8 +1647,8 @@ asserting_not_null (class=typing #args=1): Returns argument if it is non-null

-asserting_null (class=typing #args=1): Returns argument if it is null (empty or
-absent), else throws an error.
+asserting_null (class=typing #args=1): Returns argument if it is null (empty or absent), else throws
+an error.
 
@@ -1435,8 +1657,8 @@ absent), else throws an error.

-asserting_numeric (class=typing #args=1): Returns argument if it is present with
-int or float value, else throws an error.
+asserting_numeric (class=typing #args=1): Returns argument if it is present with int or float value,
+else throws an error.
 
@@ -1445,8 +1667,8 @@ int or float value, else throws an error.

-asserting_present (class=typing #args=1): Returns argument if it is present in
-input, else throws an error.
+asserting_present (class=typing #args=1): Returns argument if it is present in input, else throws
+an error.
 
@@ -1455,8 +1677,8 @@ input, else throws an error.

-asserting_string (class=typing #args=1): Returns argument if it is present with
-string (including empty-string) value, else throws an error.
+asserting_string (class=typing #args=1): Returns argument if it is present with string (including
+empty-string) value, else throws an error.
 
@@ -1537,8 +1759,7 @@ cosh (class=math #args=1): Hyperbolic cosine.

-depth (class=maps #args=1): Prints maximum depth of hashmap: ''. Scalars have
-depth 0.
+depth (class=maps #args=1): Prints maximum depth of hashmap: ''. Scalars have depth 0.
 
@@ -1651,8 +1872,8 @@ fsec2hms(5000.25) = "01:23:20.250000"

-gmt2sec (class=time #args=1): Parses GMT timestamp as integer seconds since the
-epoch.
+gmt2sec (class=time #args=1): Parses GMT timestamp as integer seconds since
+the epoch.
 
@@ -1661,8 +1882,8 @@ epoch.

-gsub (class=string #args=3): Example: '$name=gsub($name, "old", "new")' (replace
-all).
+gsub (class=string #args=3): Example: '$name=gsub($name, "old", "new")'
+(replace all).
 
@@ -1671,8 +1892,8 @@ all).

-haskey (class=maps #args=2): True/false if map has/hasn't key, e.g. 'haskey($*,
-"a")' or 'haskey(mymap, mykey)'. Error if 1st argument is not a map.
+haskey (class=maps #args=2): True/false if map has/hasn't key, e.g. 'haskey($*, "a")' or
+'haskey(mymap, mykey)'. Error if 1st argument is not a map.
 
@@ -1700,8 +1921,8 @@ hms2fsec("01:23:20.250000") = 5000.250000

-hms2sec (class=time #args=1): Recovers integer seconds as in hms2sec("01:23:20")
-= 5000
+hms2sec (class=time #args=1): Recovers integer seconds as in
+hms2sec("01:23:20") = 5000
 
@@ -1729,8 +1950,7 @@ function. Note that invqorm(urand()) is normally distributed.

-is_absent (class=typing #args=1): False if field is present in input, false
-otherwise
+is_absent (class=typing #args=1): False if field is present in input, false otherwise
 
@@ -1739,8 +1959,7 @@ otherwise

-is_bool (class=typing #args=1): True if field is present with boolean value.
-Synonymous with is_boolean.
+is_bool (class=typing #args=1): True if field is present with boolean value. Synonymous with is_boolean.
 
@@ -1749,8 +1968,7 @@ Synonymous with is_boolean.

-is_boolean (class=typing #args=1): True if field is present with boolean value.
-Synonymous with is_bool.
+is_boolean (class=typing #args=1): True if field is present with boolean value. Synonymous with is_bool.
 
@@ -1759,8 +1977,7 @@ Synonymous with is_bool.

-is_empty (class=typing #args=1): True if field is present in input with empty
-string value, false otherwise.
+is_empty (class=typing #args=1): True if field is present in input with empty string value, false otherwise.
 
@@ -1778,8 +1995,7 @@ is_empty_map (class=typing #args=1): True if argument is a map which is empty.

-is_float (class=typing #args=1): True if field is present with value inferred to
-be float
+is_float (class=typing #args=1): True if field is present with value inferred to be float
 
@@ -1788,8 +2004,7 @@ be float

-is_int (class=typing #args=1): True if field is present with value inferred to
-be int
+is_int (class=typing #args=1): True if field is present with value inferred to be int 
 
@@ -1807,8 +2022,7 @@ is_map (class=typing #args=1): True if argument is a map.

-is_nonempty_map (class=typing #args=1): True if argument is a map which is
-non-empty.
+is_nonempty_map (class=typing #args=1): True if argument is a map which is non-empty.
 
@@ -1817,8 +2031,7 @@ non-empty.

-is_not_empty (class=typing #args=1): False if field is present in input with
-empty value, false otherwise
+is_not_empty (class=typing #args=1): False if field is present in input with empty value, false otherwise
 
@@ -1836,8 +2049,7 @@ is_not_map (class=typing #args=1): True if argument is not a map.

-is_not_null (class=typing #args=1): False if argument is null (empty or absent),
-true otherwise.
+is_not_null (class=typing #args=1): False if argument is null (empty or absent), true otherwise.
 
@@ -1846,8 +2058,7 @@ true otherwise.

-is_null (class=typing #args=1): True if argument is null (empty or absent),
-false otherwise.
+is_null (class=typing #args=1): True if argument is null (empty or absent), false otherwise.
 
@@ -1856,8 +2067,7 @@ false otherwise.

-is_numeric (class=typing #args=1): True if field is present with value inferred
-to be int or float
+is_numeric (class=typing #args=1): True if field is present with value inferred to be int or float
 
@@ -1866,8 +2076,7 @@ to be int or float

-is_present (class=typing #args=1): True if field is present in input, false
-otherwise.
+is_present (class=typing #args=1): True if field is present in input, false otherwise.
 
@@ -1876,8 +2085,7 @@ otherwise.

-is_string (class=typing #args=1): True if field is present with string
-(including empty-string) value
+is_string (class=typing #args=1): True if field is present with string (including empty-string) value
 
@@ -1895,8 +2103,7 @@ joink (class=maps #args=2): Makes string from map keys. E.g. 'joink($*, ",")'.

-joinkv (class=maps #args=3): Makes string from map key-value pairs. E.g.
-'joinkv(@v[2], "=", ",")'
+joinkv (class=maps #args=3): Makes string from map key-value pairs. E.g. 'joinkv(@v[2], "=", ",")'
 
@@ -1905,8 +2112,7 @@ joinkv (class=maps #args=3): Makes string from map key-value pairs. E.g.

-joinv (class=maps #args=2): Makes string from map keys. E.g. 'joinv(mymap,
-",")'.
+joinv (class=maps #args=2): Makes string from map keys. E.g. 'joinv(mymap, ",")'.
 
@@ -1915,8 +2121,8 @@ joinv (class=maps #args=2): Makes string from map keys. E.g. 'joinv(mymap,

-leafcount (class=maps #args=1): Counts total number of terminal values in
-hashmap. For single-level maps, same as length.
+leafcount (class=maps #args=1): Counts total number of terminal values in hashmap. For single-level maps,
+same as length.
 
@@ -1925,8 +2131,7 @@ hashmap. For single-level maps, same as length.

-length (class=maps #args=1): Counts number of top-level entries in hashmap.
-Scalars have length 1.
+length (class=maps #args=1): Counts number of top-level entries in hashmap. Scalars have length 1.
 
@@ -1981,9 +2186,8 @@ madd (class=math #args=3): a + b mod m (integers)

-mapdiff (class=maps variadic): With 0 args, returns empty map. With 1 arg,
-returns copy of arg. With 2 or more, returns copy of arg 1 with all keys from
-any of remaining argument maps removed.
+mapdiff (class=maps variadic): With 0 args, returns empty map. With 1 arg, returns copy of arg.
+With 2 or more, returns copy of arg 1 with all keys from any of remaining argument maps removed.
 
@@ -1992,9 +2196,8 @@ any of remaining argument maps removed.

-mapsum (class=maps variadic): With 0 args, returns empty map. With >= 1 arg,
-returns a map with key-value pairs from all arguments. Rightmost collisions win,
-e.g. 'mapsum({1:2,3,4},{1:5})' is '{1:5,3:4}'.
+mapsum (class=maps variadic): With 0 args, returns empty map. With >= 1 arg, returns a map with
+key-value pairs from all arguments. Rightmost collisions win, e.g. 'mapsum({1:2,3,4},{1:5})' is '{1:5,3:4}'.
 
@@ -2085,8 +2288,8 @@ the same as round($x/$m)*$m

-sec2dhms (class=time #args=1): Formats integer seconds as in sec2dhms(500000) =
-"5d18h53m20s"
+sec2dhms (class=time #args=1): Formats integer seconds as in sec2dhms(500000)
+= "5d18h53m20s"
 
@@ -2095,9 +2298,9 @@ sec2dhms (class=time #args=1): Formats integer seconds as in sec2dhms(500000) =

-sec2gmt (class=time #args=1): Formats seconds since epoch (integer part) as GMT
-timestamp, e.g. sec2gmt(1440768801.7) = "2015-08-28T13:33:21Z".  Leaves
-non-numbers as-is.
+sec2gmt (class=time #args=1): Formats seconds since epoch (integer part)
+as GMT timestamp, e.g. sec2gmt(1440768801.7) = "2015-08-28T13:33:21Z".
+Leaves non-numbers as-is.
 
@@ -2106,9 +2309,9 @@ non-numbers as-is.

-sec2gmtdate (class=time #args=1): Formats seconds since epoch (integer part) as
-GMT timestamp with year-month-date, e.g. sec2gmtdate(1440768801.7) =
-"2015-08-28".  Leaves non-numbers as-is.
+sec2gmtdate (class=time #args=1): Formats seconds since epoch (integer part)
+as GMT timestamp with year-month-date, e.g. sec2gmtdate(1440768801.7) = "2015-08-28".
+Leaves non-numbers as-is.
 
@@ -2117,8 +2320,8 @@ GMT timestamp with year-month-date, e.g. sec2gmtdate(1440768801.7) =

-sec2hms (class=time #args=1): Formats integer seconds as in sec2hms(5000) =
-"01:23:20"
+sec2hms (class=time #args=1): Formats integer seconds as in
+sec2hms(5000) = "01:23:20"
 
@@ -2155,9 +2358,8 @@ sinh (class=math #args=1): Hyperbolic sine.

-splitkv (class=maps #args=3): Splits string by separators into map with type
-inference. E.g. 'splitkv("a=1,b=2,c=3", "=", ",")' gives '{"a" : 1, "b" : 2, "c"
-: 3}'.
+splitkv (class=maps #args=3): Splits string by separators into map with type inference.
+E.g. 'splitkv("a=1,b=2,c=3", "=", ",")' gives '{"a" : 1, "b" : 2, "c" : 3}'.
 
@@ -2166,9 +2368,9 @@ inference. E.g. 'splitkv("a=1,b=2,c=3", "=", ",")' gives '{"a" : 1, "b" : 2, "c"

-splitkvx (class=maps #args=3): Splits string by separators into map without type
-inference (keys and values are strings). E.g. 'splitkv("a=1,b=2,c=3", "=", ",")'
-gives '{"a" : "1", "b" : "2", "c" : "3"}'.
+splitkvx (class=maps #args=3): Splits string by separators into map without type inference (keys and
+values are strings). E.g. 'splitkv("a=1,b=2,c=3", "=", ",")' gives
+'{"a" : "1", "b" : "2", "c" : "3"}'.
 
@@ -2177,9 +2379,8 @@ gives '{"a" : "1", "b" : "2", "c" : "3"}'.

-splitnv (class=maps #args=2): Splits string by separator into integer-indexed
-map with type inference. E.g. 'splitnv("a,b,c" , ",")' gives '{1 : "a", 2 : "b",
-3 : "c"}'.
+splitnv (class=maps #args=2): Splits string by separator into integer-indexed map with type inference.
+E.g. 'splitnv("a,b,c" , ",")' gives '{1 : "a", 2 : "b", 3 : "c"}'.
 
@@ -2188,9 +2389,8 @@ map with type inference. E.g. 'splitnv("a,b,c" , ",")' gives '{1 : "a", 2 : "b",

-splitnvx (class=maps #args=2): Splits string by separator into integer-indexed
-map without type inference (values are strings). E.g. 'splitnv("4,5,6" , ",")'
-gives '{1 : "4", 2 : "5", 3 : "6"}'.
+splitnvx (class=maps #args=2): Splits string by separator into integer-indexed map without type
+inference (values are strings). E.g. 'splitnv("4,5,6" , ",")' gives '{1 : "4", 2 : "5", 3 : "6"}'.
 
@@ -2208,9 +2408,9 @@ sqrt (class=math #args=1): Square root.

-strftime (class=time #args=2): Formats seconds since epoch (integer part) as
-timestamp, e.g.  strftime(1440768801.7,"%Y-%m-%dT%H:%M:%SZ") =
-"2015-08-28T13:33:21Z".
+strftime (class=time #args=2): Formats seconds since epoch (integer part)
+as timestamp, e.g.
+strftime(1440768801.7,"%Y-%m-%dT%H:%M:%SZ") = "2015-08-28T13:33:21Z".
 
@@ -2247,8 +2447,8 @@ e.g. strptime("2015-08-28T13:33:21Z","%Y-%m-%dT%H:%M:%SZ") = 1440768801.

-sub (class=string #args=3): Example: '$name=sub($name, "old", "new")' (replace
-once).
+sub (class=string #args=3): Example: '$name=sub($name, "old", "new")'
+(replace once).
 
@@ -2257,8 +2457,8 @@ once).

-substr (class=string #args=3): substr(s,m,n) gives substring of s from 0-up
-position m to n inclusive. Negative indices -len .. -1 alias to 0 .. len-1.
+substr (class=string #args=3): substr(s,m,n) gives substring of s from 0-up position m to n 
+inclusive. Negative indices -len .. -1 alias to 0 .. len-1.
 
@@ -2267,8 +2467,8 @@ position m to n inclusive. Negative indices -len .. -1 alias to 0 .. len-1.

-systime (class=time #args=0): Floating-point seconds since the epoch, e.g.
-1440768801.748936.
+systime (class=time #args=0): Floating-point seconds since the epoch,
+e.g. 1440768801.748936.
 
diff --git a/doc/mk-func-h2s.sh b/doc/mk-func-h2s.sh index 005a42bed..14c85a5cb 100755 --- a/doc/mk-func-h2s.sh +++ b/doc/mk-func-h2s.sh @@ -1,13 +1,26 @@ #!/bin/bash -while read funcname; do +mlr -F | grep -v '^[a-zA-Z]' | uniq | while read funcname; do echo "

$funcname

" echo "" echo "

" echo '

' echo '
'
-  mlr --help-function $funcname | fmt -80
+  mlr --help-function "$funcname"
   echo '
' echo '
' echo "" done + +mlr -F | grep '^[a-zA-Z]' | sort -u | while read funcname; do + echo "

$funcname

" + echo "" + echo "

" + echo '

' + echo '
'
+  mlr --help-function "$funcname"
+  echo '
' + echo '
' + echo "" +done + diff --git a/doc/reference-dsl.html b/doc/reference-dsl.html index 30841a40d..4960e7c6f 100644 --- a/doc/reference-dsl.html +++ b/doc/reference-dsl.html @@ -227,7 +227,33 @@ Miller commands were run with pretty-print-tabular output format. • Unset statements
• Filter statements
• Built-in functions for filter and put
-    • Operators
+    • +
+    • -
+    • *
+    • /
+    • //
+    • %
+    • **
+    • |
+    • ^
+    • &
+    • ~
+    • <<
+    • >>
+    • ==
+    • !=
+    • =~
+    • !=~
+    • >
+    • >=
+    • <
+    • <=
+    • &&
+    • ||
+    • ^^
+    • !
+    • ? :
+    • .
    • abs
    • acos
    • acosh
@@ -3654,43 +3680,1621 @@ reference.

You can get a list of all functions using mlr -F. -

Operators

- + + +

+

+ +

+

+
++ (class=arithmetic #args=2): Addition.
++ (class=arithmetic #args=1): Unary plus.
+
+
+ +

-

+ +

+

+
+- (class=arithmetic #args=2): Subtraction.
+- (class=arithmetic #args=1): Unary minus.
+
+
+ +

*

+ +

+

+
+* (class=arithmetic #args=2): Multiplication.
+
+
+ +

/

+ +

+

+
+/ (class=arithmetic #args=2): Division.
+
+
+ +

//

+ +

+

+
+// (class=arithmetic #args=2): Integer division: rounds to negative (pythonic).
+
+
+ +

%

+ +

+

+
+% (class=arithmetic #args=2): Remainder; never negative-valued (pythonic).
+
+
+ +

**

+ +

+

+
+** (class=arithmetic #args=2): Exponentiation; same as pow, but as an infix
+operator.
+
+
+ +

|

+ +

+

+
+| (class=arithmetic #args=2): Bitwise OR.
+
+
+ +

^

+ +

+

+
+^ (class=arithmetic #args=2): Bitwise XOR.
+
+
+ +

&

+ +

+

+
+& (class=arithmetic #args=2): Bitwise AND.
+
+
+ +

~

+ +

+

+
+~ (class=arithmetic #args=1): Bitwise NOT. Beware '$y=~$x' since =~ is the
+regex-match operator: try '$y = ~$x'.
+
+
+ +

<<

+ +

+

+
+<< (class=arithmetic #args=2): Bitwise left-shift.
+
+
+ +

>>

+ +

+

+
+>> (class=arithmetic #args=2): Bitwise right-shift.
+
+
+ +

==

+ +

+

+
+== (class=boolean #args=2): String/numeric equality. Mixing number and string
+results in string compare.
+
+
+ +

!=

+ +

+

+
+!= (class=boolean #args=2): String/numeric inequality. Mixing number and string
+results in string compare.
+
+
+ +

=~

+ +

+

+
+=~ (class=boolean #args=2): String (left-hand side) matches regex (right-hand
+side), e.g. '$name =~ "^a.*b$"'.
+
+
+ +

!=~

+ +

+

+
+!=~ (class=boolean #args=2): String (left-hand side) does not match regex
+(right-hand side), e.g. '$name !=~ "^a.*b$"'.
+
+
+ +

>

+ +

+

+
+> (class=boolean #args=2): String/numeric greater-than. Mixing number and string
+results in string compare.
+
+
+ +

>=

+ +

+

+
+>= (class=boolean #args=2): String/numeric greater-than-or-equals. Mixing number
+and string results in string compare.
+
+
+ +

<

+ +

+

+
+< (class=boolean #args=2): String/numeric less-than. Mixing number and string
+results in string compare.
+
+
+ +

<=

+ +

+

+
+<= (class=boolean #args=2): String/numeric less-than-or-equals. Mixing number
+and string results in string compare.
+
+
+ +

&&

+ +

+

+
+&& (class=boolean #args=2): Logical AND.
+
+
+ +

||

+ +

+

+
+|| (class=boolean #args=2): Logical OR.
+
+
+ +

^^

+ +

+

+
+^^ (class=boolean #args=2): Logical XOR.
+
+
+ +

!

+ +

+

+
+! (class=boolean #args=1): Logical negation.
+
+
+ +

? :

+ +

+

+
+? : (class=boolean #args=3): Ternary operator.
+
+
+ +

.

+ +

+

+
+. (class=string #args=2): String concatenation.
 
-

abs

@@ -3741,8 +5345,8 @@ asinh (class=math #args=1): Inverse hyperbolic sine.

-asserting_absent (class=typing #args=1): Returns argument if it is absent in the
-input ata, else throws an error.
+asserting_absent (class=typing #args=1): Returns argument if it is absent in the input data, else
+throws an error.
 
@@ -3751,8 +5355,8 @@ input ata, else throws an error.

-asserting_bool (class=typing #args=1): Returns argument if it is present with
-boolean value, else throws an error.
+asserting_bool (class=typing #args=1): Returns argument if it is present with boolean value, else
+throws an error.
 
@@ -3761,8 +5365,8 @@ boolean value, else throws an error.

-asserting_boolean (class=typing #args=1): Returns argument if it is present with
-boolean value, else throws an error.
+asserting_boolean (class=typing #args=1): Returns argument if it is present with boolean value, else
+throws an error.
 
@@ -3771,8 +5375,8 @@ boolean value, else throws an error.

-asserting_empty (class=typing #args=1): Returns argument if it is present in
-input with empty value, else throws an error.
+asserting_empty (class=typing #args=1): Returns argument if it is present in input with empty value,
+else throws an error.
 
@@ -3781,8 +5385,8 @@ input with empty value, else throws an error.

-asserting_empty_map (class=typing #args=1): Returns argument if it is a map with
-empty value, else throws an error.
+asserting_empty_map (class=typing #args=1): Returns argument if it is a map with empty value, else
+throws an error.
 
@@ -3791,8 +5395,8 @@ empty value, else throws an error.

-asserting_float (class=typing #args=1): Returns argument if it is present with
-float value, else throws an error.
+asserting_float (class=typing #args=1): Returns argument if it is present with float value, else
+throws an error.
 
@@ -3801,8 +5405,8 @@ float value, else throws an error.

-asserting_int (class=typing #args=1): Returns argument if it is present with int
-value, else throws an error.
+asserting_int (class=typing #args=1): Returns argument if it is present with int value, else
+throws an error.
 
@@ -3811,8 +5415,7 @@ value, else throws an error.

-asserting_map (class=typing #args=1): Returns argument if it is a map, else
-throws an error.
+asserting_map (class=typing #args=1): Returns argument if it is a map, else throws an error.
 
@@ -3821,8 +5424,8 @@ throws an error.

-asserting_nonempty_map (class=typing #args=1): Returns argument if it is a
-non-empty map, else throws an error.
+asserting_nonempty_map (class=typing #args=1): Returns argument if it is a non-empty map, else throws
+an error.
 
@@ -3831,8 +5434,8 @@ non-empty map, else throws an error.

-asserting_not_empty (class=typing #args=1): Returns argument if it is present in
-input with non-empty value, else throws an error.
+asserting_not_empty (class=typing #args=1): Returns argument if it is present in input with non-empty
+value, else throws an error.
 
@@ -3841,8 +5444,7 @@ input with non-empty value, else throws an error.

-asserting_not_map (class=typing #args=1): Returns argument if it is not a map,
-else throws an error.
+asserting_not_map (class=typing #args=1): Returns argument if it is not a map, else throws an error.
 
@@ -3851,8 +5453,8 @@ else throws an error.

-asserting_not_null (class=typing #args=1): Returns argument if it is non-null
-(non-empty and non-absent), else throws an error.
+asserting_not_null (class=typing #args=1): Returns argument if it is non-null (non-empty and non-absent),
+else throws an error.
 
@@ -3861,8 +5463,8 @@ asserting_not_null (class=typing #args=1): Returns argument if it is non-null

-asserting_null (class=typing #args=1): Returns argument if it is null (empty or
-absent), else throws an error.
+asserting_null (class=typing #args=1): Returns argument if it is null (empty or absent), else throws
+an error.
 
@@ -3871,8 +5473,8 @@ absent), else throws an error.

-asserting_numeric (class=typing #args=1): Returns argument if it is present with
-int or float value, else throws an error.
+asserting_numeric (class=typing #args=1): Returns argument if it is present with int or float value,
+else throws an error.
 
@@ -3881,8 +5483,8 @@ int or float value, else throws an error.

-asserting_present (class=typing #args=1): Returns argument if it is present in
-input, else throws an error.
+asserting_present (class=typing #args=1): Returns argument if it is present in input, else throws
+an error.
 
@@ -3891,8 +5493,8 @@ input, else throws an error.

-asserting_string (class=typing #args=1): Returns argument if it is present with
-string (including empty-string) value, else throws an error.
+asserting_string (class=typing #args=1): Returns argument if it is present with string (including
+empty-string) value, else throws an error.
 
@@ -3973,8 +5575,7 @@ cosh (class=math #args=1): Hyperbolic cosine.

-depth (class=maps #args=1): Prints maximum depth of hashmap: ''. Scalars have
-depth 0.
+depth (class=maps #args=1): Prints maximum depth of hashmap: ''. Scalars have depth 0.
 
@@ -4087,8 +5688,8 @@ fsec2hms(5000.25) = "01:23:20.250000"

-gmt2sec (class=time #args=1): Parses GMT timestamp as integer seconds since the
-epoch.
+gmt2sec (class=time #args=1): Parses GMT timestamp as integer seconds since
+the epoch.
 
@@ -4097,8 +5698,8 @@ epoch.

-gsub (class=string #args=3): Example: '$name=gsub($name, "old", "new")' (replace
-all).
+gsub (class=string #args=3): Example: '$name=gsub($name, "old", "new")'
+(replace all).
 
@@ -4107,8 +5708,8 @@ all).

-haskey (class=maps #args=2): True/false if map has/hasn't key, e.g. 'haskey($*,
-"a")' or 'haskey(mymap, mykey)'. Error if 1st argument is not a map.
+haskey (class=maps #args=2): True/false if map has/hasn't key, e.g. 'haskey($*, "a")' or
+'haskey(mymap, mykey)'. Error if 1st argument is not a map.
 
@@ -4136,8 +5737,8 @@ hms2fsec("01:23:20.250000") = 5000.250000

-hms2sec (class=time #args=1): Recovers integer seconds as in hms2sec("01:23:20")
-= 5000
+hms2sec (class=time #args=1): Recovers integer seconds as in
+hms2sec("01:23:20") = 5000
 
@@ -4165,8 +5766,7 @@ function. Note that invqorm(urand()) is normally distributed.

-is_absent (class=typing #args=1): False if field is present in input, false
-otherwise
+is_absent (class=typing #args=1): False if field is present in input, false otherwise
 
@@ -4175,8 +5775,7 @@ otherwise

-is_bool (class=typing #args=1): True if field is present with boolean value.
-Synonymous with is_boolean.
+is_bool (class=typing #args=1): True if field is present with boolean value. Synonymous with is_boolean.
 
@@ -4185,8 +5784,7 @@ Synonymous with is_boolean.

-is_boolean (class=typing #args=1): True if field is present with boolean value.
-Synonymous with is_bool.
+is_boolean (class=typing #args=1): True if field is present with boolean value. Synonymous with is_bool.
 
@@ -4195,8 +5793,7 @@ Synonymous with is_bool.

-is_empty (class=typing #args=1): True if field is present in input with empty
-string value, false otherwise.
+is_empty (class=typing #args=1): True if field is present in input with empty string value, false otherwise.
 
@@ -4214,8 +5811,7 @@ is_empty_map (class=typing #args=1): True if argument is a map which is empty.

-is_float (class=typing #args=1): True if field is present with value inferred to
-be float
+is_float (class=typing #args=1): True if field is present with value inferred to be float
 
@@ -4224,8 +5820,7 @@ be float

-is_int (class=typing #args=1): True if field is present with value inferred to
-be int
+is_int (class=typing #args=1): True if field is present with value inferred to be int 
 
@@ -4243,8 +5838,7 @@ is_map (class=typing #args=1): True if argument is a map.

-is_nonempty_map (class=typing #args=1): True if argument is a map which is
-non-empty.
+is_nonempty_map (class=typing #args=1): True if argument is a map which is non-empty.
 
@@ -4253,8 +5847,7 @@ non-empty.

-is_not_empty (class=typing #args=1): False if field is present in input with
-empty value, false otherwise
+is_not_empty (class=typing #args=1): False if field is present in input with empty value, false otherwise
 
@@ -4272,8 +5865,7 @@ is_not_map (class=typing #args=1): True if argument is not a map.

-is_not_null (class=typing #args=1): False if argument is null (empty or absent),
-true otherwise.
+is_not_null (class=typing #args=1): False if argument is null (empty or absent), true otherwise.
 
@@ -4282,8 +5874,7 @@ true otherwise.

-is_null (class=typing #args=1): True if argument is null (empty or absent),
-false otherwise.
+is_null (class=typing #args=1): True if argument is null (empty or absent), false otherwise.
 
@@ -4292,8 +5883,7 @@ false otherwise.

-is_numeric (class=typing #args=1): True if field is present with value inferred
-to be int or float
+is_numeric (class=typing #args=1): True if field is present with value inferred to be int or float
 
@@ -4302,8 +5892,7 @@ to be int or float

-is_present (class=typing #args=1): True if field is present in input, false
-otherwise.
+is_present (class=typing #args=1): True if field is present in input, false otherwise.
 
@@ -4312,8 +5901,7 @@ otherwise.

-is_string (class=typing #args=1): True if field is present with string
-(including empty-string) value
+is_string (class=typing #args=1): True if field is present with string (including empty-string) value
 
@@ -4331,8 +5919,7 @@ joink (class=maps #args=2): Makes string from map keys. E.g. 'joink($*, ",")'.

-joinkv (class=maps #args=3): Makes string from map key-value pairs. E.g.
-'joinkv(@v[2], "=", ",")'
+joinkv (class=maps #args=3): Makes string from map key-value pairs. E.g. 'joinkv(@v[2], "=", ",")'
 
@@ -4341,8 +5928,7 @@ joinkv (class=maps #args=3): Makes string from map key-value pairs. E.g.

-joinv (class=maps #args=2): Makes string from map keys. E.g. 'joinv(mymap,
-",")'.
+joinv (class=maps #args=2): Makes string from map keys. E.g. 'joinv(mymap, ",")'.
 
@@ -4351,8 +5937,8 @@ joinv (class=maps #args=2): Makes string from map keys. E.g. 'joinv(mymap,

-leafcount (class=maps #args=1): Counts total number of terminal values in
-hashmap. For single-level maps, same as length.
+leafcount (class=maps #args=1): Counts total number of terminal values in hashmap. For single-level maps,
+same as length.
 
@@ -4361,8 +5947,7 @@ hashmap. For single-level maps, same as length.

-length (class=maps #args=1): Counts number of top-level entries in hashmap.
-Scalars have length 1.
+length (class=maps #args=1): Counts number of top-level entries in hashmap. Scalars have length 1.
 
@@ -4417,9 +6002,8 @@ madd (class=math #args=3): a + b mod m (integers)

-mapdiff (class=maps variadic): With 0 args, returns empty map. With 1 arg,
-returns copy of arg. With 2 or more, returns copy of arg 1 with all keys from
-any of remaining argument maps removed.
+mapdiff (class=maps variadic): With 0 args, returns empty map. With 1 arg, returns copy of arg.
+With 2 or more, returns copy of arg 1 with all keys from any of remaining argument maps removed.
 
@@ -4428,9 +6012,8 @@ any of remaining argument maps removed.

-mapsum (class=maps variadic): With 0 args, returns empty map. With >= 1 arg,
-returns a map with key-value pairs from all arguments. Rightmost collisions win,
-e.g. 'mapsum({1:2,3,4},{1:5})' is '{1:5,3:4}'.
+mapsum (class=maps variadic): With 0 args, returns empty map. With >= 1 arg, returns a map with
+key-value pairs from all arguments. Rightmost collisions win, e.g. 'mapsum({1:2,3,4},{1:5})' is '{1:5,3:4}'.
 
@@ -4521,8 +6104,8 @@ the same as round($x/$m)*$m

-sec2dhms (class=time #args=1): Formats integer seconds as in sec2dhms(500000) =
-"5d18h53m20s"
+sec2dhms (class=time #args=1): Formats integer seconds as in sec2dhms(500000)
+= "5d18h53m20s"
 
@@ -4531,9 +6114,9 @@ sec2dhms (class=time #args=1): Formats integer seconds as in sec2dhms(500000) =

-sec2gmt (class=time #args=1): Formats seconds since epoch (integer part) as GMT
-timestamp, e.g. sec2gmt(1440768801.7) = "2015-08-28T13:33:21Z".  Leaves
-non-numbers as-is.
+sec2gmt (class=time #args=1): Formats seconds since epoch (integer part)
+as GMT timestamp, e.g. sec2gmt(1440768801.7) = "2015-08-28T13:33:21Z".
+Leaves non-numbers as-is.
 
@@ -4542,9 +6125,9 @@ non-numbers as-is.

-sec2gmtdate (class=time #args=1): Formats seconds since epoch (integer part) as
-GMT timestamp with year-month-date, e.g. sec2gmtdate(1440768801.7) =
-"2015-08-28".  Leaves non-numbers as-is.
+sec2gmtdate (class=time #args=1): Formats seconds since epoch (integer part)
+as GMT timestamp with year-month-date, e.g. sec2gmtdate(1440768801.7) = "2015-08-28".
+Leaves non-numbers as-is.
 
@@ -4553,8 +6136,8 @@ GMT timestamp with year-month-date, e.g. sec2gmtdate(1440768801.7) =

-sec2hms (class=time #args=1): Formats integer seconds as in sec2hms(5000) =
-"01:23:20"
+sec2hms (class=time #args=1): Formats integer seconds as in
+sec2hms(5000) = "01:23:20"
 
@@ -4591,9 +6174,8 @@ sinh (class=math #args=1): Hyperbolic sine.

-splitkv (class=maps #args=3): Splits string by separators into map with type
-inference. E.g. 'splitkv("a=1,b=2,c=3", "=", ",")' gives '{"a" : 1, "b" : 2, "c"
-: 3}'.
+splitkv (class=maps #args=3): Splits string by separators into map with type inference.
+E.g. 'splitkv("a=1,b=2,c=3", "=", ",")' gives '{"a" : 1, "b" : 2, "c" : 3}'.
 
@@ -4602,9 +6184,9 @@ inference. E.g. 'splitkv("a=1,b=2,c=3", "=", ",")' gives '{"a" : 1, "b" : 2, "c"

-splitkvx (class=maps #args=3): Splits string by separators into map without type
-inference (keys and values are strings). E.g. 'splitkv("a=1,b=2,c=3", "=", ",")'
-gives '{"a" : "1", "b" : "2", "c" : "3"}'.
+splitkvx (class=maps #args=3): Splits string by separators into map without type inference (keys and
+values are strings). E.g. 'splitkv("a=1,b=2,c=3", "=", ",")' gives
+'{"a" : "1", "b" : "2", "c" : "3"}'.
 
@@ -4613,9 +6195,8 @@ gives '{"a" : "1", "b" : "2", "c" : "3"}'.

-splitnv (class=maps #args=2): Splits string by separator into integer-indexed
-map with type inference. E.g. 'splitnv("a,b,c" , ",")' gives '{1 : "a", 2 : "b",
-3 : "c"}'.
+splitnv (class=maps #args=2): Splits string by separator into integer-indexed map with type inference.
+E.g. 'splitnv("a,b,c" , ",")' gives '{1 : "a", 2 : "b", 3 : "c"}'.
 
@@ -4624,9 +6205,8 @@ map with type inference. E.g. 'splitnv("a,b,c" , ",")' gives '{1 : "a", 2 : "b",

-splitnvx (class=maps #args=2): Splits string by separator into integer-indexed
-map without type inference (values are strings). E.g. 'splitnv("4,5,6" , ",")'
-gives '{1 : "4", 2 : "5", 3 : "6"}'.
+splitnvx (class=maps #args=2): Splits string by separator into integer-indexed map without type
+inference (values are strings). E.g. 'splitnv("4,5,6" , ",")' gives '{1 : "4", 2 : "5", 3 : "6"}'.
 
@@ -4644,9 +6224,9 @@ sqrt (class=math #args=1): Square root.

-strftime (class=time #args=2): Formats seconds since epoch (integer part) as
-timestamp, e.g.  strftime(1440768801.7,"%Y-%m-%dT%H:%M:%SZ") =
-"2015-08-28T13:33:21Z".
+strftime (class=time #args=2): Formats seconds since epoch (integer part)
+as timestamp, e.g.
+strftime(1440768801.7,"%Y-%m-%dT%H:%M:%SZ") = "2015-08-28T13:33:21Z".
 
@@ -4683,8 +6263,8 @@ e.g. strptime("2015-08-28T13:33:21Z","%Y-%m-%dT%H:%M:%SZ") = 1440768801.

-sub (class=string #args=3): Example: '$name=sub($name, "old", "new")' (replace
-once).
+sub (class=string #args=3): Example: '$name=sub($name, "old", "new")'
+(replace once).
 
@@ -4693,8 +6273,8 @@ once).

-substr (class=string #args=3): substr(s,m,n) gives substring of s from 0-up
-position m to n inclusive. Negative indices -len .. -1 alias to 0 .. len-1.
+substr (class=string #args=3): substr(s,m,n) gives substring of s from 0-up position m to n 
+inclusive. Negative indices -len .. -1 alias to 0 .. len-1.
 
@@ -4703,8 +6283,8 @@ position m to n inclusive. Negative indices -len .. -1 alias to 0 .. len-1.

-systime (class=time #args=0): Floating-point seconds since the epoch, e.g.
-1440768801.748936.
+systime (class=time #args=0): Floating-point seconds since the epoch,
+e.g. 1440768801.748936.