summaryrefslogtreecommitdiffstats
path: root/regex.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-02-20 03:18:41 -0800
committerKaz Kylheku <kaz@kylheku.com>2015-02-20 03:18:41 -0800
commit7197508cb5460ad4c18dfbffd07f8cc411d37065 (patch)
tree2dd9f9a93808ec15b29afd61002b21a8eab33762 /regex.h
parentc554153d3fe9a21e57854d3174e2804adfb22f00 (diff)
downloadtxr-7197508cb5460ad4c18dfbffd07f8cc411d37065.tar.gz
txr-7197508cb5460ad4c18dfbffd07f8cc411d37065.tar.bz2
txr-7197508cb5460ad4c18dfbffd07f8cc411d37065.zip
String-returning wrappers for some regex matching functions.
* eval.c (eval_init): Register search-regst, match-regst and match-regst-right intrinsics. * regex.c (search_regst, match_regst, match_regst_right): New functions. * regex.h (search_regst, match_regst, match_regst_right): Declared. * txr.1: Documented new variants.
Diffstat (limited to 'regex.h')
-rw-r--r--regex.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/regex.h b/regex.h
index e3d3715d..90695a1d 100644
--- a/regex.h
+++ b/regex.h
@@ -35,6 +35,9 @@ val search_regex(val haystack, val needle_regex, val start_num, val from_end);
val range_regex(val haystack, val needle_regex, val start_num, val from_end);
val match_regex(val str, val regex, val pos);
val match_regex_right(val str, val regex, val end);
+val search_regst(val haystack, val needle_regex, val start_num, val from_end);
+val match_regst(val str, val regex, val pos);
+val match_regst_right(val str, val regex, val end);
val regsub(val regex, val repl, val str);
void regex_init(void);