Mega Code Archive

 
Categories / Ruby / String
 

Enter a range to grab a range of characters

# Two dots (..) means include the last character: cite = "this is a test" cite[0..4]