Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: 한글의 초성, 중성, 종성 위치 가능 여부를 검사하는 함수 #24

Closed
evan-moon opened this issue Apr 10, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@evan-moon
Copy link
Member

evan-moon commented Apr 10, 2024

Description

인자로 문자를 받아 초성, 중성, 종성 위치가 가능한 문자인지 검사하는 함수입니다.

함수의 동작은 소스 내부의 HANGUL_CHARACTERS_BY_FIRST_INDEX, HANGUL_CHARACTERS_BY_MIDDLE_INDEX, HANGUL_CHARACTERS_BY_LAST_INDEX에 종속됩니다.

이 함수들을 추후 #18 이슈의 구현 시 검사 로직을 추상화할 때 사용하면 좋을 것 같습니다.

canBeChosung('ㄱ') // true
canBeChosung('ㅃ') // true
canBeChosung('ㄱㅅ') // false
canBeChosung('ㅏ') // false
canBeJungsung('ㅏ') // true
canBeJungsung('ㅗㅏ') // true
canBeJungsung('ㅘ') // false
canBeJungsung('ㄱ') // false
canBeJongsung('ㄱ') // true
canBeJongsung('ㄱㅅ') // true
canBeJongsung('ㅘ') // false
canBeJongsung('ㄹㅍ') // false

Possible Solution

No response

etc.

함수의 동작이 HANGUL_CHARACTERS_BY_FIRST_INDEX, HANGUL_CHARACTERS_BY_MIDDLE_INDEX, HANGUL_CHARACTERS_BY_LAST_INDEX의 구성에 종속된다면, , 값은 false로 계산됩니다.

같은 값은 실제로 유저가 입력하기에는 번거로운 값이기 때문에 ㄱㅅ와 같은 형태로 검사하는 것이 합리적이지만,
와 같이 조합된 모음은 유저가 쉽게 입력할 수 있는 값이기 때문에 어떻게 처리해줘야 할지에 대한 고민이 필요합니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant