Ruby: include/ruby/internal/intern/re.h Source File

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

re.h
Go to the documentation of this file.
1#ifndef RBIMPL_INTERN_RE_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_INTERN_RE_H
23#include "ruby/internal/attr/nonnull.h"
24#include "ruby/internal/dllexport.h"
25#include "ruby/internal/value.h"
26
27 RBIMPL_SYMBOL_EXPORT_BEGIN()
28
29/* re.c */
30
31
42#define rb_memcmp memcmp
43
60int rb_memcicmp(const void *s1,const void *s2, long n);
61
76void rb_match_busy(VALUE md);
77
96 VALUE rb_reg_nth_defined(int n, VALUE md);
97
108 VALUE rb_reg_nth_match(int n, VALUE md);
109
121int rb_reg_backref_number(VALUE match, VALUE backref);
122
129 VALUE rb_reg_last_match(VALUE md);
130
137 VALUE rb_reg_match_pre(VALUE md);
138
145 VALUE rb_reg_match_post(VALUE md);
146
153 VALUE rb_reg_match_last(VALUE md);
154
162#define HAVE_RB_REG_NEW_STR 1
163
173 VALUE rb_reg_new_str(VALUE src, int opts);
174
175 RBIMPL_ATTR_NONNULL(())
184 VALUE rb_reg_new(const char *src, long len, int opts);
185
194 VALUE rb_reg_alloc(void);
195
204 VALUE rb_reg_init_str(VALUE re, VALUE s, int options);
205
222 VALUE rb_reg_match(VALUE re, VALUE str);
223
236 VALUE rb_reg_match2(VALUE re);
237
245int rb_reg_options(VALUE re);
246
247 RBIMPL_SYMBOL_EXPORT_END()
248
249#endif /* RBIMPL_INTERN_RE_H */
dllexport.h
Tweaking visibility of C variables/functions.
RBIMPL_SYMBOL_EXPORT_END
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition dllexport.h:106
RBIMPL_SYMBOL_EXPORT_BEGIN
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition dllexport.h:97
rb_reg_backref_number
int rb_reg_backref_number(VALUE match, VALUE backref)
Queries the index of the given named capture.
Definition re.c:1229
rb_reg_options
int rb_reg_options(VALUE re)
Queries the options of the passed regular expression.
Definition re.c:4118
rb_reg_last_match
VALUE rb_reg_last_match(VALUE md)
This just returns the argument, stringified.
Definition re.c:1886
rb_reg_match
VALUE rb_reg_match(VALUE re, VALUE str)
This is the match operator.
Definition re.c:3601
rb_match_busy
void rb_match_busy(VALUE md)
Asserts that the given MatchData is "occupied".
Definition re.c:1435
rb_reg_nth_match
VALUE rb_reg_nth_match(int n, VALUE md)
Queries the nth captured substring.
Definition re.c:1861
rb_reg_match_post
VALUE rb_reg_match_post(VALUE md)
The portion of the original string after the given match.
Definition re.c:1943
rb_reg_nth_defined
VALUE rb_reg_nth_defined(int n, VALUE md)
Identical to rb_reg_nth_match(), except it just returns Boolean.
Definition re.c:1844
rb_reg_match_pre
VALUE rb_reg_match_pre(VALUE md)
The portion of the original string before the given match.
Definition re.c:1910
rb_reg_new_str
VALUE rb_reg_new_str(VALUE src, int opts)
Identical to rb_reg_new(), except it takes the expression in Ruby's string instead of C's.
Definition re.c:3302
rb_reg_match_last
VALUE rb_reg_match_last(VALUE md)
The portion of the original string that captured at the very last.
Definition re.c:1960
rb_reg_match2
VALUE rb_reg_match2(VALUE re)
Identical to rb_reg_match(), except it matches against rb_lastline_get() (or, the $_).
Definition re.c:3656
rb_reg_new
VALUE rb_reg_new(const char *src, long len, int opts)
Creates a new Regular expression.
Definition re.c:3356
rb_memcicmp
int rb_memcicmp(const void *s1, const void *s2, long n)
Identical to st_locale_insensitive_strcasecmp(), except it is timing safe and returns something diffe...
Definition re.c:92
nonnull.h
Defines RBIMPL_ATTR_NONNULL.
RBIMPL_ATTR_NONNULL
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull))
Definition nonnull.h:30
value.h
Defines VALUE and ID.
VALUE
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40