README.md in mb_string-0.1.1 vs README.md in mb_string-0.1.2

- old
+ new

@@ -1,8 +1,8 @@ # mb_string -`mb_string` is extended Ruby string class for dealing multi-byte strings, add `mb_ljust`, `mb_rjust` and `mb_center` methods. +`mb_string` is extended Ruby string class for dealing multi-byte strings, add `mb_ljust`, `mb_rjust`, `mb_center` and `mb_truncate` methods. ## Installation Add this line to your application's Gemfile: @@ -29,10 +29,17 @@ => "あいうえおんんんんん" "あいうえお".mb_ljust(20, 'ほげ') => "あいうえおほげほげほ" +`mb_truncate`: + require 'mb_string' + "あいうえお".mb_truncate(6) + => "あ..." + + "あいうえお".mb_truncate(8, omission: 'ほげ') + => "あいほげ" ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.