Mega Code Archive

 
Categories / Ruby / String
 

Retrieve part of a string with the [] method, using a range

thoreau = "qwerqwerqwerqwerqwer" puts thoreau[7..9]