Module: RE2::String Deprecated

Defined in:
lib/re2/string.rb

Overview

Deprecated.

Use methods on RE2 and Regexp instead.

Instance Method Summary collapse

Instance Method Details

#re2_escapeObject Also known as: re2_quote

Deprecated.

Use RE2.QuoteMeta instead.



30
31
32
# File 'lib/re2/string.rb', line 30

def re2_escape
  RE2.QuoteMeta(self)
end

#re2_gsub(*args) ⇒ Object

Deprecated.

Use RE2.GlobalReplace instead.



20
21
22
# File 'lib/re2/string.rb', line 20

def re2_gsub(*args)
  RE2.GlobalReplace(self, *args)
end

#re2_match(pattern, *args) ⇒ Object

Deprecated.

Use Regexp#match instead.



25
26
27
# File 'lib/re2/string.rb', line 25

def re2_match(pattern, *args)
  RE2::Regexp.new(pattern).match(self, *args)
end

#re2_sub(*args) ⇒ Object

Deprecated.

Use RE2.Replace instead.



15
16
17
# File 'lib/re2/string.rb', line 15

def re2_sub(*args)
  RE2.Replace(self, *args)
end