Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/multi_string_replace.rb

Instance Method Summary collapse

Instance Method Details

#mreplace(attrs = {}) ⇒ Object

Exact match replace using the Aho–Corasick algorithm

Args: attrs: Hash - String Key value pairs of characters to search and replace respectively



13
14
15
# File 'lib/multi_string_replace.rb', line 13

def mreplace(attrs = {})
  MultiStringReplace.replace(self, attrs)
end