> ## Documentation Index
> Fetch the complete documentation index at: https://hangulpy.uiharu.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 한글 여부 판별 (is_hangul, is_hangul_consonant, is_hangul_vowel)

> 문자열과 단일 문자 기준의 기본 한글 판별 함수

## is\_hangul

문자열 전체가 한글인지 검사합니다.

```python theme={null}
is_hangul(text: str, spaces: bool = False) -> bool
```

`spaces` 를 생략하면 기본값은 `False` 이고, 공백이 포함된 문자열은 `False` 로 판정합니다.
빈 문자열은 한글 문자열로 보지 않으므로 `False` 를 반환합니다.

### 예시

```python theme={null}
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

기본 한글 자음인지 확인합니다.

```python theme={null}
is_hangul_consonant(char: str) -> bool
```

## is\_hangul\_vowel

기본 한글 모음인지 확인합니다.

```python theme={null}
is_hangul_vowel(char: str) -> bool
```

### 예시

```python theme={null}
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
```

## 같이 보기

* [완성형과 자모 판별](syllable-types)
