Accessing Strings : char in string « String « Ruby
- Ruby
- String
- char in string
Accessing Strings
speaker = "King Richard III"
# If you enter a string as the argument to [], it will return that string, if found:
puts speaker['King']
Related examples in the same category