StringHelpers extend some instance methods to String class
gem install string_helpersor add to your Gemfile
gem string_helpersSlug
"Jhon Doe".slug! #=> "Jhon-Doe"Slugged?
"Jhon Doe".slugged? #=> false
"Jhon-Doe".slugged? #=> true
"Jhon---".slugged? #=> true
"Jhon".slugged? #=> trueFill
"Jhon Doe".fill!(10) #=> "Jhon Doe "
"Jhon Doe".fill(5) #=> "Jhon..."Apostrophe's
"Jhon Doe".apostrophe! #=> "Jhon Doe’s"
"Marrys".apostrophe! #=> "Marrys’"Camelize
"jhon doe and marry".camelize! #=> "JhonDoeAndMarry"Blank?
" ".blank? #=> true
" a".blank? #=> falseBlank!
" a".blank! #=> ""Camelize
"jhon doe and marry".camelize! #=> "JhonDoeAndMarry"StringHelper is available under the MIT license.