Skip to content
forked from rkh/coder

Handle encodings, no matter the Ruby version, Operating System and installed libraries

License

Notifications You must be signed in to change notification settings

piotrmilcarz/coder

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coder

A Ruby library to deal with encodings, no matter if you're on 1.8 or 1.9, JRuby or Rubinius, if you have a working iconv or not, it chooses the best way for you to handle String encodings.

Usage

At the moment, Coder only cleans strings for you. I plan to add string conversion and encoding detection later.

Cleaning Strings

clean_string = Coder.clean(dirty_string)

You can also specify the encoding:

clean_string = Coder.clean(dirty_string, 'UTF-8')

You can also modify a string in-place:

Coder.clean! some_string

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

Handle encodings, no matter the Ruby version, Operating System and installed libraries

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%