Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/numerals_jp/extension/string.rb

Overview

Extensions of String class

Instance Method Summary collapse

Instance Method Details

#jp_to_numString

Replaces Japanese numerals with Arabic numerals in the string.

Examples:

"三十六".jp_to_num # => "36"

Returns:

  • (String)

    the converted string



9
10
11
# File 'lib/numerals_jp/extension/string.rb', line 9

def jp_to_num
  NumeralsJp::StringConverter.jp_to_num(self)
end