summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-03-23 19:11:17 -0700
committerKaz Kylheku <kaz@kylheku.com>2020-03-23 19:11:17 -0700
commit58a7e0821fb6120a3abee2214b039a10db5b2aa1 (patch)
treef7752195cda13a41c9d35388886b95d4a081ac21 /txr.1
parent3afce46748b8efa98570d5c8b0fcf2a151e672a4 (diff)
downloadtxr-58a7e0821fb6120a3abee2214b039a10db5b2aa1.tar.gz
txr-58a7e0821fb6120a3abee2214b039a10db5b2aa1.tar.bz2
txr-58a7e0821fb6120a3abee2214b039a10db5b2aa1.zip
New contains function: near alias of search.
Harmonizes with starts-with and ends-with. * eval.c (eval_init): Register contains intrinsic. * lib.c (contains): New function. * lib.h (contains): Delared. * txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.117
1 files changed, 16 insertions, 1 deletions
diff --git a/txr.1 b/txr.1
index f0b1726d..0d087525 100644
--- a/txr.1
+++ b/txr.1
@@ -29680,7 +29680,7 @@ is returned.
.coNP Function @ search
.synb
-.mets (search < haystack < needle >> [ testfun <> [ keyfun ])
+.mets (search < haystack < needle >> [ testfun <> [ keyfun ]])
.syne
.desc
The
@@ -29773,6 +29773,21 @@ with one argument. If it is not supplied, it defaults to
[search "abcd" #(#\eC #\eD) : chr-toupper] -> 2
.brev
+.coNP Function @ contains
+.synb
+.mets (contains < needle < haystack >> [ testfun <> [ keyfun ]])
+.syne
+.desc
+The syntax of the
+.code contains
+function differs from that of
+.codn search :
+that the
+.meta needle
+and
+.meta haystack
+arguments are reversed. The semantics is identical.
+
.coNP Function @ rsearch
.synb
.mets (rsearch < haystack < needle >> [ testfun <> [ keyfun ])