You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Populate help strings for systime, systimeint, and uptime DSL functions
* Extend help strings for joink, joinv, and joinkv
* Expand on-line help for ssub/sub/gsub
* doc artifacts
(class=collections #args=2) True/false if map has/hasn't key, e.g. 'haskey($*, "a")' or 'haskey(mymap, mykey)', or true/false if array index is in bounds / out of bounds. Error if 1st argument is not a map or array. Note -n..-1 alias to 1..n in Miller arrays.
@@ -2303,19 +2309,19 @@ FUNCTIONS FOR FILTER/PUT
2303
2309
(class=typing #args=1) True if field is present with string (including empty-string) value
2304
2310
2305
2311
joink
2306
-
(class=conversion #args=2) Makes string from map/array keys.
2312
+
(class=conversion #args=2) Makes string from map/array keys. First argument is map/array; second is separator string.
2307
2313
Examples:
2308
2314
joink({"a":3,"b":4,"c":5}, ",") = "a,b,c".
2309
2315
joink([1,2,3], ",") = "1,2,3".
2310
2316
2311
2317
joinkv
2312
-
(class=conversion #args=3) Makes string from map/array key-value pairs.
2318
+
(class=conversion #args=3) Makes string from map/array key-value pairs. First argument is map/array; second is pair-separator string; third is field-separator string. Mnemonic: the "=" comes before the "," in the output and in the arguments to joinkv.
(class=conversion #args=2) Makes string from map/array values.
2324
+
(class=conversion #args=2) Makes string from map/array values. First argument is map/array; second is separator string.
2319
2325
Examples:
2320
2326
joinv([3,4,5], ",") = "3,4,5"
2321
2327
joinv({"a":3,"b":4,"c":5}, ",") = "3,4,5"
@@ -2519,6 +2525,8 @@ FUNCTIONS FOR FILTER/PUT
2519
2525
2520
2526
ssub
2521
2527
(class=string #args=3) Like sub but does no regexing. No characters are special.
2528
+
Example:
2529
+
ssub("abc.def", ".", "X") gives "abcXdef"
2522
2530
2523
2531
strftime
2524
2532
(class=time #args=2) Formats seconds since the epoch as timestamp. Format strings are as in the C library (please see "man strftime" on your system), with the Miller-specific addition of "%1S" through "%9S" which format the seconds with 1 through 9 decimal places, respectively. ("%S" uses no decimal places.) See also strftime_local.
(class=string #args=3) substr is an alias for substr0. See also substr1. Miller is generally 1-up with all array and string indices, but, this is a backward-compatibility issue with Miller 5 and below. Arrays are new in Miller 6; the substr function is older.
@@ -2574,10 +2588,10 @@ FUNCTIONS FOR FILTER/PUT
2574
2588
(class=system #args=1) Run command string, yielding its stdout minus final carriage return.
2575
2589
2576
2590
systime
2577
-
(class=time #args=0) help string will go here
2591
+
(class=time #args=0) Returns the system time in floating-point seconds since the epoch.
2578
2592
2579
2593
systimeint
2580
-
(class=time #args=0) help string will go here
2594
+
(class=time #args=0) Returns the system time in integer seconds since the epoch.
(class=collections #args=2) True/false if map has/hasn't key, e.g. 'haskey($*, "a")' or 'haskey(mymap, mykey)', or true/false if array index is in bounds / out of bounds. Error if 1st argument is not a map or array. Note -n..-1 alias to 1..n in Miller arrays.
@@ -2282,19 +2288,19 @@ FUNCTIONS FOR FILTER/PUT
2282
2288
(class=typing #args=1) True if field is present with string (including empty-string) value
2283
2289
2284
2290
joink
2285
-
(class=conversion #args=2) Makes string from map/array keys.
2291
+
(class=conversion #args=2) Makes string from map/array keys. First argument is map/array; second is separator string.
2286
2292
Examples:
2287
2293
joink({"a":3,"b":4,"c":5}, ",") = "a,b,c".
2288
2294
joink([1,2,3], ",") = "1,2,3".
2289
2295
2290
2296
joinkv
2291
-
(class=conversion #args=3) Makes string from map/array key-value pairs.
2297
+
(class=conversion #args=3) Makes string from map/array key-value pairs. First argument is map/array; second is pair-separator string; third is field-separator string. Mnemonic: the "=" comes before the "," in the output and in the arguments to joinkv.
(class=conversion #args=2) Makes string from map/array values.
2303
+
(class=conversion #args=2) Makes string from map/array values. First argument is map/array; second is separator string.
2298
2304
Examples:
2299
2305
joinv([3,4,5], ",") = "3,4,5"
2300
2306
joinv({"a":3,"b":4,"c":5}, ",") = "3,4,5"
@@ -2498,6 +2504,8 @@ FUNCTIONS FOR FILTER/PUT
2498
2504
2499
2505
ssub
2500
2506
(class=string #args=3) Like sub but does no regexing. No characters are special.
2507
+
Example:
2508
+
ssub("abc.def", ".", "X") gives "abcXdef"
2501
2509
2502
2510
strftime
2503
2511
(class=time #args=2) Formats seconds since the epoch as timestamp. Format strings are as in the C library (please see "man strftime" on your system), with the Miller-specific addition of "%1S" through "%9S" which format the seconds with 1 through 9 decimal places, respectively. ("%S" uses no decimal places.) See also strftime_local.
(class=string #args=3) substr is an alias for substr0. See also substr1. Miller is generally 1-up with all array and string indices, but, this is a backward-compatibility issue with Miller 5 and below. Arrays are new in Miller 6; the substr function is older.
@@ -2553,10 +2567,10 @@ FUNCTIONS FOR FILTER/PUT
2553
2567
(class=system #args=1) Run command string, yielding its stdout minus final carriage return.
2554
2568
2555
2569
systime
2556
-
(class=time #args=0) help string will go here
2570
+
(class=time #args=0) Returns the system time in floating-point seconds since the epoch.
2557
2571
2558
2572
systimeint
2559
-
(class=time #args=0) help string will go here
2573
+
(class=time #args=0) Returns the system time in integer seconds since the epoch.
joinkv (class=conversion #args=3) Makes string from map/array key-value pairs.
517
+
joinkv (class=conversion #args=3) Makes string from map/array key-value pairs. First argument is map/array; second is pair-separator string; third is field-separator string. Mnemonic: the "=" comes before the "," in the output and in the arguments to joinkv.
help: "Returns the system time in floating-point seconds since the epoch.",
1085
1102
zaryFunc: bifs.BIF_systime,
1086
1103
},
1087
1104
1088
1105
{
1089
1106
name: "systimeint",
1090
1107
class: FUNC_CLASS_TIME,
1091
-
help: "help string will go here",
1108
+
help: "Returns the system time in integer seconds since the epoch.",
1092
1109
zaryFunc: bifs.BIF_systimeint,
1093
1110
},
1094
1111
1095
1112
{
1096
1113
name: "uptime",
1097
1114
class: FUNC_CLASS_TIME,
1098
-
help: "help string will go here",
1115
+
help: "Returns the time in floating-point seconds since the current Miller program was started.",
1099
1116
zaryFunc: bifs.BIF_uptime,
1100
1117
},
1101
1118
@@ -1417,7 +1434,7 @@ strftime_local.`,
1417
1434
{
1418
1435
name: "joink",
1419
1436
class: FUNC_CLASS_CONVERSION,
1420
-
help: `Makes string from map/array keys.`,
1437
+
help: `Makes string from map/array keys. First argument is map/array; second is separator string.`,
1421
1438
examples: []string{
1422
1439
`joink({"a":3,"b":4,"c":5}, ",") = "a,b,c".`,
1423
1440
`joink([1,2,3], ",") = "1,2,3".`,
@@ -1428,7 +1445,7 @@ strftime_local.`,
1428
1445
{
1429
1446
name: "joinv",
1430
1447
class: FUNC_CLASS_CONVERSION,
1431
-
help: `Makes string from map/array values.`,
1448
+
help: `Makes string from map/array values. First argument is map/array; second is separator string.`,
1432
1449
examples: []string{
1433
1450
`joinv([3,4,5], ",") = "3,4,5"`,
1434
1451
`joinv({"a":3,"b":4,"c":5}, ",") = "3,4,5"`,
@@ -1439,10 +1456,11 @@ strftime_local.`,
1439
1456
{
1440
1457
name: "joinkv",
1441
1458
class: FUNC_CLASS_CONVERSION,
1442
-
help: `Makes string from map/array key-value pairs.`,
1459
+
help: `Makes string from map/array key-value pairs. First argument is map/array;
1460
+
second is pair-separator string; third is field-separator string. Mnemonic: the "=" comes before the "," in the output and in the arguments to joinkv.`,
0 commit comments