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

integer_to_japanese

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

integer_to_japanese

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

IntegerToJapanese

数値を日本語読みにする処理を追加します。

追加方法

gemに追加します。

$ gem install integer_to_japanese

またはGemfileに追加します。

gem 'integer_to_japanese'

使い方

require 'integer_to_japanese'

800.to_hiragana
#=> "はっぴゃく"

3000.to_katakana
#=> "サンゼン"

20000.to_kanji
#=> "二万"

負数の場合はマイナスが付きます。

-100.to_hiragana
#=> "まいなすひゃく"

# 漢字の場合はカタカナ表記で付きます
-50.to_kanji
#=> "マイナス五十"

無量大数を超える位の数字はnilになります。

(10 ** 71).to_kanji
#=> "千無量大数"

(10 ** 72).to_kanji
#=> nil

License

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

FAQs

Package last updated on 28 Jan 2023

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