Test if something is included in the set of objects specified by the range. : Range include « Range « Ruby






Test if something is included in the set of objects specified by the range.


print "R is within A to Z!" if ('A'..'Z').include?('R')

 








Related examples in the same category

1.Being a lowercase letter
2.is an integer in a range
3.is an integer in an exclusive range
4.Check the range belongings
5.Range containability check
6.Range pattern match