Add "to_range" methods

This is a bit of code I find myself using a great deal in command line applications, and your library is extensive enough that someone else may find it helpful. Hope this helps!