mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-25 17:04:01 +00:00
strlen
This commit is contained in:
parent
c576970e6d
commit
85f2e9e60e
4 changed files with 9 additions and 5 deletions
|
|
@ -518,6 +518,7 @@ lrec_evaluator_t* lrec_evaluator_alloc_from_unary_func_name(char* function_name,
|
|||
} else if (streq(function_name, "toupper")) { return lrec_evaluator_alloc_from_s_s_func(s_s_toupper_func, parg1);
|
||||
} else if (streq(function_name, "sec2gmt")) { return lrec_evaluator_alloc_from_s_f_func(s_f_sec2gmt_func, parg1);
|
||||
} else if (streq(function_name, "gmt2sec")) { return lrec_evaluator_alloc_from_f_s_func(f_s_gmt2sec_func, parg1);
|
||||
} else if (streq(function_name, "strlen")) { return lrec_evaluator_alloc_from_s_f_func(f_s_strlen_func, parg1);
|
||||
|
||||
} else return NULL; // xxx handle me better
|
||||
}
|
||||
|
|
|
|||
|
|
@ -214,6 +214,12 @@ mlr_val_t f_s_gmt2sec_func(mlr_val_t* pval1) {
|
|||
return rv;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
mlr_val_t f_s_strlen_func(mlr_val_t* pval1) {
|
||||
mlr_val_t rv = {.type = MT_DOUBLE, .u.double_val = strlen(pval1->u.string_val)};
|
||||
return rv;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
// xxx cmt us!!!!
|
||||
|
||||
|
|
|
|||
|
|
@ -180,6 +180,7 @@ mlr_val_t s_sss_sub_func(mlr_val_t* pval1, mlr_val_t* pval2, mlr_val_t* pval3);
|
|||
// ----------------------------------------------------------------
|
||||
mlr_val_t s_f_sec2gmt_func(mlr_val_t* pval1);
|
||||
mlr_val_t f_s_gmt2sec_func(mlr_val_t* pval1);
|
||||
mlr_val_t f_s_strlen_func(mlr_val_t* pval1);
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
mlr_val_t eq_op_func(mlr_val_t* pval1, mlr_val_t* pval2);
|
||||
|
|
|
|||
|
|
@ -35,15 +35,10 @@ FEATURES/+
|
|||
-> move datadirs too ..... unify c & doc data dirs to parent?
|
||||
-> remove/coalesce/gzip the large data files
|
||||
|
||||
* readme @ each level incl. sof et al. @ base
|
||||
-> & perfopt: lrec_t not hashmap per se; stdio backings with minimal copying; mmap entirely; ... ?
|
||||
|
||||
! mlr sort CLI opt for choice of heap/merge/quick -- ?
|
||||
|
||||
* mod op (either c-like, or sane) and put into wikidoc if so.
|
||||
|
||||
? rip through filenames @ start & abend unless -f each: fail fast.
|
||||
|
||||
================================================================
|
||||
NEATEN
|
||||
|
||||
|
|
@ -123,6 +118,7 @@ UT/REG
|
|||
* tac/X/tac for all X
|
||||
* multi-csv I/O: include --icsv --odkvp and --idkvp --ocsv, as well as --csv cases
|
||||
* het-xtab out
|
||||
* modulus
|
||||
|
||||
================================================================
|
||||
INTERNAL DOCS (e.g. README)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue