1686c82b9Scgyurgyik //===-- Implementation of isalpha------------------------------------------===//
2686c82b9Scgyurgyik //
3686c82b9Scgyurgyik // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4686c82b9Scgyurgyik // See https://llvm.org/LICENSE.txt for license information.
5686c82b9Scgyurgyik // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6686c82b9Scgyurgyik //
7686c82b9Scgyurgyik //===----------------------------------------------------------------------===//
8686c82b9Scgyurgyik 
9686c82b9Scgyurgyik #include "src/ctype/isalpha.h"
10686c82b9Scgyurgyik 
11686c82b9Scgyurgyik #include "src/__support/common.h"
12c120edc7SMichael Jones #include "src/__support/ctype_utils.h"
13686c82b9Scgyurgyik 
14686c82b9Scgyurgyik namespace __llvm_libc {
15686c82b9Scgyurgyik 
16686c82b9Scgyurgyik // TODO: Currently restricted to default locale.
17686c82b9Scgyurgyik // These should be extended using locale information.
18*9cdd4ea0SAlfonso Gregory LLVM_LIBC_FUNCTION(int, isalpha, (int c)) {
19*9cdd4ea0SAlfonso Gregory   return static_cast<int>(internal::isalpha(static_cast<unsigned>(c)));
20*9cdd4ea0SAlfonso Gregory }
21686c82b9Scgyurgyik 
22686c82b9Scgyurgyik } // namespace __llvm_libc
23