Skip to main content

compose

Function compose 

Source
pub fn compose(
    choseong: char,
    jungseong: char,
    jongseong: Option<char>,
) -> Option<char>
Expand description

초성, 중성, 종성을 결합하여 한글 음절을 만듭니다.

§Arguments

  • cho - 초성 자모
  • jung - 중성 자모
  • jong - 종성 자모 (없으면 None)

§Returns

  • Some(한글 음절): 결합 성공
  • None: 잘못된 자모

§Example

use mecab_ko_hangul::compose;

let c = compose('ㅎ', 'ㅏ', Some('ㄴ'));
assert_eq!(c, Some('한'));

let c = compose('ㄱ', 'ㅏ', None);
assert_eq!(c, Some('가'));