Check out example codes for "how to split string into characters ruby". It will help you in understanding the concepts better.

Code Example 1

string = "hey there"
string.chars #=> ["h", "e", "y", " ", "t", "h", "e", "r", "e"]
#OR
string.split("")

Learn ReactJs, React Native from akashmittal.com