summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-03-12 20:40:03 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-03-12 20:40:03 -0700
commite39f3fcc0520ce0d93082a8b8e87187eb38efd48 (patch)
tree35c82a812f230e08405eb365a7fec4badc42af3f /eval.c
parentdf45e73d23d6871ce0ca415e009bf1bd2a520804 (diff)
downloadtxr-e39f3fcc0520ce0d93082a8b8e87187eb38efd48.tar.gz
txr-e39f3fcc0520ce0d93082a8b8e87187eb38efd48.tar.bz2
txr-e39f3fcc0520ce0d93082a8b8e87187eb38efd48.zip
New functions starts-with and ends-with.
* eval.c (eval_init): Register starts-with and ends-with intrinsics. * lib.c (starts_with, ends_with): New functions. * lib.c (starts_with, ends_with): Declared. * txr.1: Documented.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 3ca3a52c..b4beaa9a 100644
--- a/eval.c
+++ b/eval.c
@@ -5754,6 +5754,8 @@ void eval_init(void)
reg_fun(intern(lit("pos-min"), user_package), func_n3o(pos_min, 1));
reg_fun(intern(lit("mismatch"), user_package), func_n4o(mismatch, 2));
reg_fun(intern(lit("rmismatch"), user_package), func_n4o(rmismatch, 2));
+ reg_fun(intern(lit("starts-with"), user_package), func_n4o(starts_with, 2));
+ reg_fun(intern(lit("ends-with"), user_package), func_n4o(ends_with, 2));
reg_fun(intern(lit("take"), user_package), func_n2(take));
reg_fun(intern(lit("take-while"), user_package), func_n3o(take_while, 2));
reg_fun(intern(lit("take-until"), user_package), func_n3o(take_until, 2));