Module: Spinying::CoreExt
- Defined in:
- lib/spinying/core_ext.rb
Class Method Summary collapse
Class Method Details
.get_pinying(word) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/spinying/core_ext.rb', line 6 def self.(word) = "" word.each_codepoint do |codepoint| << (hanzi?(codepoint) ? ZHUNICODETABLE[codepoint-ZHUNICODESTART] : codepoint) end return .downcase end |