Method: String#swap_with

Defined in:
lib/hash-utils/string.rb

#swap_with(from) ⇒ Object Also known as: swap_with!



797
798
799
800
801
802
# File 'lib/hash-utils/string.rb', line 797

def swap_with(from)
    intermediate = self.dup
    self.replace(from)
    from.replace(intermediate)
    return self
end