Ruby - String Operations
You want to update multiple characters in a Ruby string efficiently. Which approach best uses string mutability?
str = "hello" # Update 'e' and 'o' to 'a' and 'u'
str = "hello" # Update 'e' and 'o' to 'a' and 'u'
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions