Sha256: a0c466e3aac22c819ef43ed39c8df886e35060c3a5cee1e898e72190080273fc
Contents?: true
Size: 637 Bytes
Versions: 26
Compression:
Stored size: 637 Bytes
Contents
#-- # Credit goes to Phil Tomson. #++ class String # Is the string upcase/uppercase? # # "THIS".upcase? #=> true # "This".upcase? #=> false # "this".upcase? #=> false # def upcase? self.upcase == self end # Alias for #upcase? method. alias_method( :uppercase?, :upcase? ) end # _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # =begin test require 'test/unit' class TCString < Test::Unit::TestCase def test_upcase? assert( 'ABC'.upcase? ) end def test_uppercase? assert( 'ABC'.uppercase? ) end end =end
Version data entries
26 entries across 26 versions & 1 rubygems