StringExt
String utils for accented and special chars
Installation
Add this line to your application's Gemfile:
gem 'string_ext'
And then execute:
$ bundle
Or install it yourself as:
$ gem install string_ext
Usage
StringExt.downcase 'ÁÉÍÓÚÑ' # => 'áéíóúñ'
StringExt.upcase 'áéíóúñ' # => 'ÁÉÍÓÚÑ'
StringExt.unaccented 'áÉíÓú' # => 'aEiOu'
include StringExt
downcase 'ÁÉÍÓÚÑ' # => 'áéíóúñ'
upcase 'áéíóúñ' # => 'ÁÉÍÓÚÑ'
unaccented 'áÉíÓú' # => 'aEiOu'
module MyModule
extend StringExt
downcase 'ÁÉÍÓÚÑ' # => 'áéíóúñ'
upcase 'áéíóúñ' # => 'ÁÉÍÓÚÑ'
unaccented 'áÉíÓú' # => 'aEiOu'
end
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/gabynaiman/string_ext.
License
The gem is available as open source under the terms of the MIT License.