method

sub!

ruby latest stable - Class: String
sub!(*args)
public

Performs the same substitution as String#sub in-place.

Returns str if a substitution was performed or nil if no substitution was performed.