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

Version Path
facets-glimmer-3.2.0 lib/core/facets/string/uppercase.rb
facets-3.1.0 lib/core/facets/string/uppercase.rb
facets-3.0.0 lib/core/facets/string/uppercase.rb
facets-2.9.3 lib/core/facets/string/uppercase.rb
facets-2.9.2 lib/core/facets/string/uppercase.rb
facets-2.9.2 src/core/facets/string/uppercase.rb
facets-2.9.1 lib/core/facets/string/uppercase.rb
facets-2.9.0 lib/core/facets/string/uppercase.rb
facets-2.9.0.pre.2 lib/core/facets/string/uppercase.rb
facets-2.9.0.pre.1 lib/core/facets/string/uppercase.rb
facets-2.8.4 lib/core/facets/string/uppercase.rb
facets-2.8.3 lib/core/facets/string/uppercase.rb
facets-2.8.2 lib/core/facets/string/uppercase.rb
facets-2.8.1 lib/core/facets/string/uppercase.rb
facets-2.8.0 lib/core/facets/string/uppercase.rb
facets-2.7.0 lib/core/facets/string/uppercase.rb
facets-2.6.0 lib/core/facets/string/uppercase.rb