Ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e0ba6b95ab71a441357ed5484e33498)
re.h
Go to the documentation of this file.
1#ifndef RUBY_RE_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RUBY_RE_H 1
13#include "ruby/internal/config.h"
14
15#ifdef HAVE_SYS_TYPES_H
16# include <sys/types.h>
17#endif
18
19#include <stdio.h>
20
21#include "ruby/regex.h"
24
25struct re_registers; /* Defined in onigmo.h */
26
28
29
36VALUE rb_reg_regcomp(VALUE str);
37
61long rb_reg_search(VALUE re, VALUE str, long pos, int dir);
62
81VALUE rb_reg_regsub(VALUE repl, VALUE src, struct re_registers *regs, VALUE rexp);
82
96long rb_reg_adjust_startpos(VALUE re, VALUE str, long pos, int dir);
97
105VALUE rb_reg_quote(VALUE str);
106
126regex_t *rb_reg_prepare_re(VALUE re, VALUE str);
127
143int rb_reg_region_copy(struct re_registers *dst, const struct re_registers *src);
144
146
147#endif /* RUBY_RE_H */
Tweaking visibility of C variables/functions.
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition: dllexport.h:106
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition: dllexport.h:97
long rb_reg_search(VALUE re, VALUE str, long pos, int dir)
Runs the passed regular expression over the passed string.
Definition: re.c:1697
regex_t * rb_reg_prepare_re(VALUE re, VALUE str)
Exercises various checks and preprocesses so that the given regular expression can be applied to the ...
Definition: re.c:1580
long rb_reg_adjust_startpos(VALUE re, VALUE str, long pos, int dir)
Tell us if this is a wrong idea, but it seems this function has no usage at all.
Definition: re.c:1587
VALUE rb_reg_regcomp(VALUE str)
Creates a new instance of rb_cRegexp.
Definition: re.c:3053
VALUE rb_reg_quote(VALUE str)
Escapes any characters that would have special meaning in a regular expression.
Definition: re.c:3541
VALUE rb_reg_regsub(VALUE repl, VALUE src, struct re_registers *regs, VALUE rexp)
Substitution.
Definition: re.c:3856
int rb_reg_region_copy(struct re_registers *dst, const struct re_registers *src)
Duplicates a match data.
Definition: re.c:955
Defines struct RMatch.