Being a lowercase letter : Range include « Range « Ruby






Being a lowercase letter

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

 








Related examples in the same category

1.Test if something is included in the set of objects specified by the range.
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