Sha256: a98e41553acbe1fd4e45a682621dde338630a28c96195236ac50f3a756c5ca6f

Contents?: true

Size: 459 Bytes

Versions: 11

Compression:

Stored size: 459 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

11 entries across 11 versions & 1 rubygems

Version Path
fedux_org-stdlib-0.11.1 lib/fedux_org_stdlib/core_ext/string/characterize.rb
fedux_org-stdlib-0.11.0 lib/fedux_org_stdlib/core_ext/string/characterize.rb
fedux_org-stdlib-0.10.9 lib/fedux_org_stdlib/core_ext/string/characterize.rb
fedux_org-stdlib-0.10.8 lib/fedux_org_stdlib/core_ext/string/characterize.rb
fedux_org-stdlib-0.10.7 lib/fedux_org_stdlib/core_ext/string/characterize.rb
fedux_org-stdlib-0.10.6 lib/fedux_org_stdlib/core_ext/string/characterize.rb
fedux_org-stdlib-0.10.5 lib/fedux_org_stdlib/core_ext/string/characterize.rb
fedux_org-stdlib-0.10.4 lib/fedux_org_stdlib/core_ext/string/characterize.rb
fedux_org-stdlib-0.10.3 lib/fedux_org_stdlib/core_ext/string/characterize.rb
fedux_org-stdlib-0.10.2 lib/fedux_org_stdlib/core_ext/string/characterize.rb
fedux_org-stdlib-0.10.1 lib/fedux_org_stdlib/core_ext/string/characterize.rb