Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mojicon

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mojicon

  • 0.3.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Mojicon

Mojicon is a Ruby Gem designed to simplify text processing for Japanese characters. It provides a wide range of text transformation functionalities, including conversions between full-width and half-width characters, kana and hiragana, kanji numerals to Arabic numerals, Arabic numerals to kanji, and more. This Gem allows methods to be applied directly to string objects.

Features

  • Conversion between full-width and half-width characters
  • Conversion between hiragana and katakana
  • Conversion from kanji numerals to Arabic numerals and vice versa
  • Conversion from old kanji to new kanji
  • Flexible text processing through normalization and transformation

Installation

Add the following line to your Gemfile:

gem 'mojicon'

Then, install the Gem using Bundler:

bundle install

Or, you can install the Gem directly:

gem install mojicon

Usage

With Mojicon, you can apply methods directly to string objects. For example:

require 'mojicon'

str = "hoge"
puts str.han_to_zen
# => "hoge"

Available methods include:

  • trim_space - Removes all full-width and half-width spaces from the string.
  • zen_to_han - Converts full-width characters to half-width characters.
  • han_to_zen - Converts half-width characters to full-width characters.
  • kana_to_hira - Converts katakana to hiragana.
  • hira_to_kana - Converts hiragana to katakana.
  • kanji_to_arabic - Converts kanji numeral representations to Arabic numerals.
  • arabic_to_kanji - Converts Arabic numerals to kanji numeral representations.

And many more.

How to Contribute

1.Fork the repository.

2.Create a feature branch (git checkout -b feature/fooBar).

3.Commit your changes (git commit -am 'Add some fooBar').

4.Push to the branch (git push origin feature/fooBar).

5.Create a new Pull Request.

License

This project is licensed under the MIT License.

FAQs

Package last updated on 06 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc