From 6b40915a50db3159394221a7b6b46cbb74dae606 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 16 Sep 2016 06:55:59 -0700 Subject: 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. --- lib.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib.h') diff --git a/lib.h b/lib.h index 179c0c66..0ec09a74 100644 --- a/lib.h +++ b/lib.h @@ -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); -- cgit v1.2.3