#kanji #japanese #katakana #converter #romaji

japanese_number_converter

A lib to convert numbers into japanese

1 unstable release

0.1.0 Jun 13, 2023

#1792 in Algorithms

MIT license

12KB
209 lines

Converts a number into japanese

This converter takes a number in input and return a result of type JapaneseNumber. This type has three properties:

  • arabiasu : the number given asinput
  • kanji : the number in kanji format
  • katakana : the number in katakana format
  • romaji : the number in roman format

Example

let result = japanese_number_converter::
            JapaneseNumber::convert(100);
println!("Result : {}  =>  {}  =>  {}  =>  {}",
    result.arabiasuji(),result.kanji(),result.katakana(),result.romaji());
    // Result : 100  =>  百  =>  ヒャク   =>  hyaku  

lib.rs:

Converts a number into japanese

This converter takes a number in input and return a result of type JapaneseNumber. This type has three properties:

  • arabiasu : the number given asinput
  • kanji : the number in kanji format
  • katakana : the number in katakana format
  • romaji : the number in roman format

Example

let result = japanese_number_converter::
            JapaneseNumber::convert(100);
println!("Result : {}  =>  {}  =>  {}  =>  {}",
    result.arabiasuji(),result.kanji(),result.katakana(),result.romaji());
    // Result : 100  =>  百  =>  ヒャク   =>  hyaku  

No runtime deps