[Dart] 한글 종성 판별

LOCKED·2020년 11월 17일
2

조사를 붙이려다 보면 단어의 마지막 글자에 종성의 유무를 판별해야할 때가 있다.

bool checkBottomConsonant(String input){
  return (input.runes.last - 0xAC00) % 28!=0;
}
// true 면 받침 있음
// false면 받침 없음
profile
Flutter 개발자 :'>

0개의 댓글