diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-03-23 19:11:17 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-03-23 19:11:17 -0700 |
commit | 58a7e0821fb6120a3abee2214b039a10db5b2aa1 (patch) | |
tree | f7752195cda13a41c9d35388886b95d4a081ac21 /txr.1 | |
parent | 3afce46748b8efa98570d5c8b0fcf2a151e672a4 (diff) | |
download | txr-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.1 | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -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 ]) |