is_hangul
문자열 전체가 한글인지 검사합니다.spaces 를 생략하면 기본값은 False 이고, 공백이 포함된 문자열은 False 로 판정합니다.
빈 문자열은 한글 문자열로 보지 않으므로 False 를 반환합니다.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
문자열과 단일 문자 기준의 기본 한글 판별 함수
is_hangul(text: str, spaces: bool = False) -> bool
spaces 를 생략하면 기본값은 False 이고, 공백이 포함된 문자열은 False 로 판정합니다.
빈 문자열은 한글 문자열로 보지 않으므로 False 를 반환합니다.
from hangulpy import is_hangul
print(is_hangul("반가워요")) # True
print(is_hangul("안녕 하세요")) # False
print(is_hangul("안녕 하세요", spaces=True)) # True
print(is_hangul("")) # False
is_hangul_consonant(char: str) -> bool
is_hangul_vowel(char: str) -> bool
from hangulpy import is_hangul_consonant, is_hangul_vowel
print(is_hangul_consonant("ㄱ")) # True
print(is_hangul_consonant("ㅏ")) # False
print(is_hangul_vowel("ㅏ")) # True
print(is_hangul_vowel("ㄱ")) # False