Sha256: ac4754a17af45b373986d3a59d00bdd595d6258e5573616bfbb34ba73847e90d
Contents?: true
Size: 511 Bytes
Versions: 17
Compression:
Stored size: 511 Bytes
Contents
class String # Upcase first letter. # # NOTE: One might argue that this method should behave the same as # +#upcase+ and rather this behavior should be in place of +#captialize+. # Probably so, but since Matz has already defined +#captialize+ the way # it is, this name seems most fitting to the missing behavior. # def uppercase str = to_s str[0,1].upcase + str[1..-1] end # Downcase first letter. # def lowercase str = to_s str[0,1].downcase + str[1..-1] end end
Version data entries
17 entries across 16 versions & 2 rubygems