canBe
canBeChoseong
Check if a given character can be a choseong in Korean.
function canBeChoseong(character: string): boolean;
Examples
canBeChoseong('ㄱ'); // true
canBeChoseong('ㅃ'); // true
canBeChoseong('ㄱㅅ'); // false
canBeChoseong('ㅏ'); // false
canBeChoseong('가'); // false
Demo
canBeJungseong
Check if a given character can be a jungseong in Korean.
function canBeJungseong(character: string): boolean;
Examples
canBeJungseong('ㅏ'); // true
canBeJungseong('ㅗㅏ'); // true
canBeJungseong('ㅏㅗ'); // false
canBeJungseong('ㄱ'); // false
canBeJungseong('ㄱㅅ'); // false
canBeJungseong('가'); // false
Demo
canBeJongseong
Check if a given character can be a jongseong in Korean.
function canBeJongseong(character: string): boolean;
Examples
canBeJongseong('ㄱ'); // true
canBeJongseong('ㄱㅅ'); // true
canBeJongseong('ㅎㄹ'); // false
canBeJongseong('가'); // false
canBeJongseong('ㅏ'); // false
canBeJongseong('ㅗㅏ'); // false