GitXplorerGitXplorer
h

char_size

public
0 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
1e20137163cc5bbf4a3829e4639ea1085536ee6e

Merge pull request #3 from nobu/patch-3

hhaines committed 8 years ago
Unverified
473501a0dbac85579e254f7fac38f1a1a5ddcae3

Merge branch 'master' into patch-3

hhaines committed 8 years ago
Unverified
8c9dfb12b8ed8d791e6a1d7aab0397d1b7af38cd

Merge pull request #1 from nobu/patch-1

hhaines committed 8 years ago
Verified
df7810927939228bf90312556942cf924b17176f

Bump version

hhaines committed 8 years ago
Verified
ea3870c0aa3bd0ed2c8cef6983d210036eec97a1

Remove unnecessary header file

hhaines committed 8 years ago
Verified
e7ca2d60993d4408be5e1628b63f89a2913fc1b8

Match Ruby core indentation style

hhaines committed 8 years ago

README

The README file for this repository.

CharSize

Gem Version Build Status Code Climate

Find an encoding's minimum and maximum character size.

Installation

Add this line to your application's Gemfile:

gem "char_size"

And then execute:

$ bundle

Or install it yourself as:

$ gem install char_size

Usage

CharSize.min("UTF-8")    # => 1
CharSize.max("UTF-8")    # => 6
CharSize.minmax("UTF-8") # => [1, 6]

Like Encoding.find, methods take a string encoding name, or an instance of Encoding.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/haines/char_size. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.