Ruby - String Operations
What does the Ruby method
sub do when called on a string?sub do when called on a string?subsub method replaces only the first match of the pattern in the string.gsub, which replaces all matches, sub affects only the first occurrence.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions