diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-01-10 12:30:04 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-01-10 12:30:04 -0800 |
commit | b83af9a85c36d77110d66f60afdcdd41d17d3fae (patch) | |
tree | 94a12be490b79d853c281ea803958555c6807cef /lib.h | |
parent | 866c357da7ef1a2cb45290cb11ef91eb57b10169 (diff) | |
download | txr-b83af9a85c36d77110d66f60afdcdd41d17d3fae.tar.gz txr-b83af9a85c36d77110d66f60afdcdd41d17d3fae.tar.bz2 txr-b83af9a85c36d77110d66f60afdcdd41d17d3fae.zip |
New internal function scat: variable arg cat_str.
Avoids consing up list of strings.
* lib.c (vscat): New static function.
(scat): New function.
(lazy_str): Use scat instead of cat_str.
* lib.h (scat): Declared.
* eval.c (format_field): Use scat instead of cat_str.
* parser.c (open_txr_file, read_eval_stream): Likewise.
Diffstat (limited to 'lib.h')
-rw-r--r-- | lib.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -692,6 +692,7 @@ val match_str_tree(val bigstr, val tree, val pos); val replace_str(val str_in, val items, val from, val to); 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_set(val str, val set); val tok_str(val str, val tok_regex, val keep_sep); |