xref: /llvm-project/libc/src/ctype/isascii.cpp (revision 5ff3ff33ff930e4ec49da7910612d8a41eb068cb)
104edcc02SMichael Jones //===-- Implementation of isascii------------------------------------------===//
204edcc02SMichael Jones //
304edcc02SMichael Jones // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
404edcc02SMichael Jones // See https://llvm.org/LICENSE.txt for license information.
504edcc02SMichael Jones // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
604edcc02SMichael Jones //
704edcc02SMichael Jones //===----------------------------------------------------------------------===//
804edcc02SMichael Jones 
904edcc02SMichael Jones #include "src/ctype/isascii.h"
1004edcc02SMichael Jones 
1104edcc02SMichael Jones #include "src/__support/common.h"
12*5ff3ff33SPetr Hosek #include "src/__support/macros/config.h"
1304edcc02SMichael Jones 
14*5ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL {
1504edcc02SMichael Jones 
169cdd4ea0SAlfonso Gregory LLVM_LIBC_FUNCTION(int, isascii, (int c)) {
179cdd4ea0SAlfonso Gregory   return static_cast<int>((c & (~0x7f)) == 0);
189cdd4ea0SAlfonso Gregory }
1904edcc02SMichael Jones 
20*5ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL
21