summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-09-16 06:55:59 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-09-16 06:55:59 -0700
commit6d800734b64c92b5bb9979c06c84ed4d29098933 (patch)
treef3e84df93663617030daedd662ca7c7bc1546acb /lib.h
parent5e84a4ac16d1f7b96ca3dfea303e4304628e8666 (diff)
downloadtxr-6d800734b64c92b5bb9979c06c84ed4d29098933.tar.gz
txr-6d800734b64c92b5bb9979c06c84ed4d29098933.tar.bz2
txr-6d800734b64c92b5bb9979c06c84ed4d29098933.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.h1
1 files changed, 1 insertions, 0 deletions
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);