[][src]Function hypua::to_ipf_string

pub fn to_ipf_string<'a>(pua_str: &'a str) -> Cow<'a, str>

문자열에 포함된 PUA 문자를 해당되는 IPF 문자열로 변환합니다.

인수

  • pua_str - IPF로 변환할 문자열입니다.

사용 예

use hypua::to_ipf_string;

// 문장 출처: 분류두공부시언해 초간본 7:2
assert_eq!(
    to_ipf_string(" 雙ㅅ 믌 相對야 락 락 다.").as_ref(),
    "ᄒᆞᆫ 雙ㅅ 믌ᄃᆞᆯᄀᆞᆫ 相對ᄒᆞ야 ᄌᆞᄆᆞ락 ᄠᅳ락 ᄒᆞᄂᆞ다."
);

assert_eq!(
    to_ipf_string("이 문장은 PUA 문자를 포함하지 않습니다.").as_ref(),
    "이 문장은 PUA 문자를 포함하지 않습니다."
);