Ruby: include/ruby/re.h File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Functions
re.h File Reference
`#include "ruby/internal/config.h"`
`#include <sys/types.h>`
`#include <stdio.h>`
`#include "ruby/regex.h"`
`#include "ruby/internal/core/rmatch.h"`
`#include "ruby/internal/dllexport.h"`

Go to the source code of this file.

## Functions
VALUE | rb_reg_regcomp (VALUE)
long | rb_reg_search (VALUE, VALUE, long, int)
VALUE | rb_reg_regsub (VALUE, VALUE, struct re_registers *, VALUE)
long | rb_reg_adjust_startpos (VALUE, VALUE, long, int)
void | rb_match_busy (VALUE)
VALUE | rb_reg_quote (VALUE)
regex_t * | rb_reg_prepare_re (VALUE re, VALUE str)
int | rb_reg_region_copy (struct re_registers *, const struct re_registers *)

## Detailed Description

Author
  $Author$

Date
  Thu Sep 30 14:18:32 JST 1993

Copyright
  Copyright (C) 1993-2007 Yukihiro Matsumoto
  This file is a part of the programming language Ruby. Permission is hereby granted, to either redistribute and/or modify this file, provided that the conditions mentioned in the file COPYING are met. Consult the file for details.

Definition in file re.h.

## Function Documentation

## ◆ rb_match_busy()

void rb_match_busy | ( | VALUE | match | ) |

Definition at line 1305 of file re.c.

## ◆ rb_reg_adjust_startpos()

long rb_reg_adjust_startpos | ( | VALUE | re,
|  | VALUE | str,
|  | long | pos,
|  | int | reverse
| ) |  |

Definition at line 1518 of file re.c.

References onigenc_get_right_adjust_char_head(), ONIGENC_LEFT_ADJUST_CHAR_HEAD, ONIGENC_MBC_MAXLEN, range, RSTRING_LEN, RSTRING_PTR, str, and UChar.

## ◆ rb_reg_prepare_re()

regex_t * rb_reg_prepare_re | ( | VALUE | re,
|  | VALUE | str
| ) |  |

Definition at line 1511 of file re.c.

References err, rb_reg_prepare_re0(), and str.

## ◆ rb_reg_quote()

VALUE rb_reg_quote | ( | VALUE | str | ) |

Definition at line 3475 of file re.c.

References mbclen, memcpy, rb_enc_ascget(), rb_enc_associate(), rb_enc_copy(), rb_enc_get(), rb_enc_mbcput, rb_enc_str_asciionly_p(), rb_str_new, rb_str_new3, rb_str_resize(), rb_usascii_encoding(), RSTRING_LEN, RSTRING_PTR, str, and t.

## ◆ rb_reg_regcomp()

VALUE rb_reg_regcomp | ( | VALUE | str | ) |

Definition at line 2984 of file re.c.

References ENCODING_GET, memcmp(), rb_reg_new_str(), RSTRING_LEN, RSTRING_PTR, and str.

## ◆ rb_reg_region_copy()

int rb_reg_region_copy | ( | struct re_registers * | to,
|  | const struct re_registers * | from
| ) |  |

Definition at line 956 of file re.c.

References re_registers::allocated, onig_region_copy(), ONIGERR_MEMORY, and rb_gc().

Referenced by rb_reg_start_with_p().

## ◆ rb_reg_regsub()

VALUE rb_reg_regsub | ( | VALUE | str,
|  | VALUE | src,
|  | struct re_registers * | regs,
|  | VALUE | regexp
| ) |  |

Definition at line 3790 of file re.c.

References ASCGET, BEG, END, mbclen, name, NAME_TO_NUMBER, NIL_P, re_registers::num_regs, onig_noname_group_capture_is_active(), rb_enc_asciicompat, rb_enc_get(), rb_enc_str_buf_cat(), rb_eRuntimeError, rb_raise(), rb_str_buf_new(), rb_str_subseq(), RREGEXP_PTR, RSTRING_GETMEM, RSTRING_LEN, RSTRING_PTR, and str.

## ◆ rb_reg_search()

long rb_reg_search | ( | VALUE | re,
|  | VALUE | str,
|  | long | pos,
|  | int | reverse
| ) |  |

Definition at line 1628 of file re.c.

References rb_reg_search0(), and str.

Referenced by rb_reg_eqq(), and rb_reg_match2().