Sha256: 2142a2a9aa1d1fa2ac18fbcf3569cf45fd651fb09b91b1532e9946827cd30905

Contents?: true

Size: 466 Bytes

Versions: 7

Compression:

Stored size: 466 Bytes

Contents

# encoding: utf-8
require 'fedux_org_stdlib/require_files'
require_library %w(active_support/inflector/transliterate)

# String
class String
  # Make umlauts less special
  #
  # This will remove accents and umlauts and other specialities from
  # characters.
  #
  # ä => a
  # á => a
  #
  # @example Simple Example
  #
  # 'Donald E. Knütz'.transliterate
  # #=> 'Donald E. Knutz'
  def transliterate
    ActiveSupport::Inflector.transliterate(self)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fedux_org-stdlib-0.11.18 lib/fedux_org_stdlib/core_ext/string/transliterate.rb
fedux_org-stdlib-0.11.17 lib/fedux_org_stdlib/core_ext/string/transliterate.rb
fedux_org-stdlib-0.11.16 lib/fedux_org_stdlib/core_ext/string/transliterate.rb
fedux_org-stdlib-0.11.15 lib/fedux_org_stdlib/core_ext/string/transliterate.rb
fedux_org-stdlib-0.11.14 lib/fedux_org_stdlib/core_ext/string/transliterate.rb
fedux_org-stdlib-0.11.12 lib/fedux_org_stdlib/core_ext/string/transliterate.rb
fedux_org-stdlib-0.11.11 lib/fedux_org_stdlib/core_ext/string/transliterate.rb