Ruby - Ranges of Strings

Introduction

You can create ranges of strings.

For example, see whether you can figure out which values are specified by this range:

str_range = ('abc'..'def') 

This defines a range of no less than 2,110 values!

They are ordered like this: abc, abd, abe, and so on, until the end of the as; then you start on the bs: baa, bab, bac, and so on.

Related Topic