00001 /* Part of the culibs project, <http://www.eideticdew.org/culibs/>. 00002 * Copyright (C) 2008--2010 Petter Urkedal <paurkedal@eideticdew.org> 00003 * 00004 * This program is free software: you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation, either version 3 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 00018 #ifndef CUTEXT_WCTYPE_H 00019 #define CUTEXT_WCTYPE_H 00020 00021 #include <cu/wchar.h> 00022 00023 CU_BEGIN_DECLARATIONS 00024 /** \defgroup cutext_wctype_h cutext/wctype.h: Unicode Character Types 00025 ** @{ \ingroup cutext_mod 00026 ** 00027 ** \note 00028 ** These character types are derived from the Unicode general categories, and 00029 ** thus only an approximation to the locale-specific C99 classification. 00030 ** 00031 ** \note 00032 ** The mapping of these functions for non-ASCII characters are subject to 00033 ** revision. 00034 **/ 00035 00036 cu_bool_t cutext_iswalnum(cu_wint_t wc); 00037 cu_bool_t cutext_iswalpha(cu_wint_t wc); 00038 cu_bool_t cutext_iswblank(cu_wint_t wc); 00039 cu_bool_t cutext_iswcntrl(cu_wint_t wc); 00040 00041 CU_SINLINE cu_bool_t 00042 cutext_iswdigit(cu_wint_t wc) 00043 { return 0x30 <= wc && wc <= 0x39; } 00044 00045 cu_bool_t cutext_iswgraph(cu_wint_t wc); 00046 cu_bool_t cutext_iswlower(cu_wint_t wc); 00047 cu_bool_t cutext_iswprint(cu_wint_t wc); 00048 cu_bool_t cutext_iswpunct(cu_wint_t wc); 00049 cu_bool_t cutext_iswspace(cu_wint_t wc); 00050 cu_bool_t cutext_iswupper(cu_wint_t wc); 00051 cu_bool_t cutext_iswxdigit(cu_wint_t wc); 00052 00053 /** @} */ 00054 CU_END_DECLARATIONS 00055 00056 #endif