Sha256: caa25c02288a75681c399ae7c9ec7ebad7d5c970f6ac3f77c32fdb79070a5e5d

Contents?: true

Size: 455 Bytes

Versions: 8

Compression:

Stored size: 455 Bytes

Contents

# encoding: utf-8
require 'fedux_org_stdlib/require_files'
require_library %w(active_support/core_ext/string/strip active_support/core_ext/string/inflections)

# String
class String
  # Convert string to characters only
  #
  # This will remove accents and umlauts and other special characters
  #
  # @example Simple Example
  #
  # 'รค'.characterize
  # #=> 'a'
  def characterize
    ActiveSupport::Inflector.transliterate(self).parameterize
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fedux_org-stdlib-0.11.9 lib/fedux_org_stdlib/core_ext/string/characterize.rb
fedux_org-stdlib-0.11.8 lib/fedux_org_stdlib/core_ext/string/characterize.rb
fedux_org-stdlib-0.11.7 lib/fedux_org_stdlib/core_ext/string/characterize.rb
fedux_org-stdlib-0.11.6 lib/fedux_org_stdlib/core_ext/string/characterize.rb
fedux_org-stdlib-0.11.5 lib/fedux_org_stdlib/core_ext/string/characterize.rb
fedux_org-stdlib-0.11.4 lib/fedux_org_stdlib/core_ext/string/characterize.rb
fedux_org-stdlib-0.11.3 lib/fedux_org_stdlib/core_ext/string/characterize.rb
fedux_org-stdlib-0.11.2 lib/fedux_org_stdlib/core_ext/string/characterize.rb