Sha256: 13e4d3ae5de7f6dc16cfbb2a629b620c067b7c4f0ad180be359c6d0749a642d3

Contents?: true

Size: 158 Bytes

Versions: 4

Compression:

Stored size: 158 Bytes

Contents

class String

  # Transform a string into an acronym.
  #
  # CREDIT: Robert Fey
  #
  def acronym
	  gsub(/(([a-zA-Z0-9])([a-zA-Z0-9])*)./,"\\2")
  end

end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
facets-glimmer-3.2.0 lib/core/facets/string/acronym.rb
facets-3.1.0 lib/core/facets/string/acronym.rb
facets-3.0.0 lib/core/facets/string/acronym.rb
facets-2.9.3 lib/core/facets/string/acronym.rb