Sha256: 2bc47d128b442cda47fb0b6ff8b9c2ad78cce2bcdf65df30610f86e2f4b76f97

Contents?: true

Size: 320 Bytes

Versions: 32

Compression:

Stored size: 320 Bytes

Contents

class String

  #returns a string with the first letter downcased, the rest is unchanged
  def downcase_first_letter
    self[0,1].downcase + self[1..-1]
  end

  #downcases the first letter in place
  def downcase_first_letter!
    lc_first_letter = self[0,1].downcase
    self[0] = lc_first_letter
    self
  end

end

Version data entries

32 entries across 32 versions & 2 rubygems

Version Path
masterview-0.2.4 lib/masterview/string_extensions.rb
masterview-0.3.0 lib/masterview/core_ext/string.rb
masterview-0.3.1 lib/masterview/core_ext/string.rb
masterview-0.2.3 lib/masterview/string_extensions.rb
masterview-0.2.5 lib/masterview/string_extensions.rb
masterview-0.3.2 lib/masterview/core_ext/string.rb
masterview-0.3.3 lib/masterview/core_ext/string.rb
masterview-0.2.2 lib/masterview/string_extensions.rb
masterview_parser-0.0.6 lib/masterview/string_extensions.rb
masterview_parser-0.0.5 lib/masterview/string_extensions.rb
masterview_parser-0.0.4 lib/masterview/string_extensions.rb
masterview_parser-0.0.3 lib/masterview/string_extensions.rb