Examveda

What does the `split` method do when called on a string in Ruby?

A. Splits the string at every occurrence of a specified character

B. Splits the string into characters

C. Splits the string into words

D. Splits the string into substrings based on a delimiter

Answer: Option D


Join The Discussion

Related Questions on Arrays, Hashes and Strings in Ruby