diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-05-17 21:02:21 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-05-17 21:02:21 -0700 |
commit | f255d4cfaf866ced7a5fb2f4af4681d96a069b4b (patch) | |
tree | 755ddf6bfcc6ede8f6e8d7d2eabf16bae6e96c4f /eval.c | |
parent | f16a4c07c8dad9d7d144063618cf65c6e076233e (diff) | |
download | txr-f255d4cfaf866ced7a5fb2f4af4681d96a069b4b.tar.gz txr-f255d4cfaf866ced7a5fb2f4af4681d96a069b4b.tar.bz2 txr-f255d4cfaf866ced7a5fb2f4af4681d96a069b4b.zip |
split-str: new count parameter.
* eval.c (eval_init): Fix up registration of split-str to
account for new parameter.
* lib.c (split_str_keep): Implement new optional count
argument.
(spl): Pass nil value to split_str_keep for new argument.
I'd like this function to benefit from this argument also,
but the design isn't settled.
(split_str): Pass nil argument to split_str_keep.
* lib.h (split_str_keep): Declaration updated.
* tests/015/split.tl: New tests.
* txr.1: Documented.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -7217,7 +7217,7 @@ void eval_init(void) reg_fun(intern(lit("sub-str"), user_package), func_n3o(sub_str, 1)); reg_fun(intern(lit("replace-str"), user_package), func_n4o(replace_str, 2)); reg_fun(intern(lit("cat-str"), user_package), func_n2o(cat_str, 1)); - reg_fun(intern(lit("split-str"), user_package), func_n3o(split_str_keep, 2)); + reg_fun(intern(lit("split-str"), user_package), func_n4o(split_str_keep, 2)); reg_fun(intern(lit("spl"), user_package), func_n3o(spl, 2)); reg_fun(intern(lit("split-str-set"), user_package), func_n2(split_str_set)); reg_fun(intern(lit("sspl"), user_package), func_n2(sspl)); |