diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-09-16 06:55:59 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-09-16 06:55:59 -0700 |
commit | 6b40915a50db3159394221a7b6b46cbb74dae606 (patch) | |
tree | f3e84df93663617030daedd662ca7c7bc1546acb /lib.h | |
parent | 73f7e2e1c2352cc1da6784190468c24c6e003655 (diff) | |
download | txr-6b40915a50db3159394221a7b6b46cbb74dae606.tar.gz txr-6b40915a50db3159394221a7b6b46cbb74dae606.tar.bz2 txr-6b40915a50db3159394221a7b6b46cbb74dae606.zip |
split-str gains ability to keep separating pieces.
* eval.c (eval_init): Register split-str to split_str_keep,
with optional argument.
* lib.c (split_str_keep): New function, formed from
split_str, with third argument.
(split_str): Reduced to wrapper around split_str_keep.
Thus we don't have to update umpteen existing calls
with an extra nil parameter.
* lib.h (split_str_keep): Declared.
* txr.1: Documented new optional argument of split-str.
Diffstat (limited to 'lib.h')
-rw-r--r-- | lib.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -716,6 +716,7 @@ val sub_str(val str_in, val from_num, val to_num); val cat_str(val list, val sep); val scat(val sep, ...); val split_str(val str, val sep); +val split_str_keep(val str, val sep, val keep_sep); val split_str_set(val str, val set); val tok_str(val str, val tok_regex, val keep_sep); val tok_where(val str, val tok_regex); |