1 unstable release
0.1.0 | Jun 13, 2023 |
---|
#1792 in Algorithms
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 asinputkanji
: the number in kanji formatkatakana
: the number in katakana formatromaji
: 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 asinputkanji
: the number in kanji formatkatakana
: the number in katakana formatromaji
: 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