Answers for "ruby split string at character"

0

how to split string into characters ruby

string = "hey there"
string.chars #=> ["h", "e", "y", " ", "t", "h", "e", "r", "e"]
#OR
string.split("")
Posted by: Guest on September-18-2020

Code answers related to "ruby split string at character"

Browse Popular Code Answers by Language