00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00047 #ifndef STLSOFT_INCL_STLSOFT_STRING_HPP_CTYPE_TRAITS
00048 #define STLSOFT_INCL_STLSOFT_STRING_HPP_CTYPE_TRAITS
00049
00050 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
00051 # define STLSOFT_VER_INCL_STLSOFT_STRING_HPP_CTYPE_TRAITS_MAJOR 2
00052 # define STLSOFT_VER_INCL_STLSOFT_STRING_HPP_CTYPE_TRAITS_MINOR 0
00053 # define STLSOFT_VER_INCL_STLSOFT_STRING_HPP_CTYPE_TRAITS_REVISION 2
00054 # define STLSOFT_VER_INCL_STLSOFT_STRING_HPP_CTYPE_TRAITS_EDIT 18
00055 #endif
00056
00057
00058
00059
00060
00061 #ifndef STLSOFT_INCL_STLSOFT_H_STLSOFT
00062 # include <stlsoft/stlsoft.h>
00063 #endif
00064
00065 #ifndef STLSOFT_INCL_H_CTYPE
00066 # define STLSOFT_INCL_H_CTYPE
00067 # include <ctype.h>
00068 #endif
00069 #if defined(STLSOFT_COMPILER_IS_GCC) || \
00070 defined(STLSOFT_COMPILER_IS_MWERKS)
00071 # ifndef STLSOFT_INCL_H_WCTYPE
00072 # define STLSOFT_INCL_H_WCTYPE
00073 # include <wctype.h>
00074 # endif
00075 #elif defined(STLSOFT_COMPILER_IS_WATCOM)
00076 # ifndef STLSOFT_INCL_H_WCHAR
00077 # define STLSOFT_INCL_H_WCHAR
00078 # include <wchar.h>
00079 # endif
00080 #endif
00081
00082
00083
00084
00085
00086 #ifndef _STLSOFT_NO_NAMESPACE
00087 namespace stlsoft
00088 {
00089 #endif
00090
00091
00092
00098 template <ss_typename_param_k C>
00099 struct ctype_traits;
00100
00101 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
00102
00103 STLSOFT_TEMPLATE_SPECIALISATION
00104 struct ctype_traits<ss_char_a_t>
00105 {
00106 typedef ss_char_a_t char_type;
00107
00108 static ss_bool_t is_alpha(char_type ch) { return 0 != ::isalpha(ch); }
00109 static ss_bool_t is_upper(char_type ch) { return 0 != ::isupper(ch); }
00110 static ss_bool_t is_lower(char_type ch) { return 0 != ::islower(ch); }
00111 static ss_bool_t is_digit(char_type ch) { return 0 != ::isdigit(ch); }
00112 static ss_bool_t is_xdigit(char_type ch) { return 0 != ::isxdigit(ch); }
00113 static ss_bool_t is_space(char_type ch) { return 0 != ::isspace(ch); }
00114 static ss_bool_t is_punct(char_type ch) { return 0 != ::ispunct(ch); }
00115 static ss_bool_t is_alnum(char_type ch) { return 0 != ::isalnum(ch); }
00116 static ss_bool_t is_print(char_type ch) { return 0 != ::isprint(ch); }
00117 static ss_bool_t is_graph(char_type ch) { return 0 != ::isgraph(ch); }
00118 static ss_bool_t is_cntrl(char_type ch) { return 0 != ::iscntrl(ch); }
00119 static char_type to_upper(char_type ch) { return static_cast<char_type>(::toupper(ch)); }
00120 static char_type to_lower(char_type ch) { return static_cast<char_type>(::tolower(ch)); }
00121 };
00122
00123 STLSOFT_TEMPLATE_SPECIALISATION
00124 struct ctype_traits<ss_char_w_t>
00125 {
00126 typedef ss_char_w_t char_type;
00127
00128 static ss_bool_t is_alpha(char_type ch) { return 0 != ::iswalpha(ch); }
00129 static ss_bool_t is_upper(char_type ch) { return 0 != ::iswupper(ch); }
00130 static ss_bool_t is_lower(char_type ch) { return 0 != ::iswlower(ch); }
00131 static ss_bool_t is_digit(char_type ch) { return 0 != ::iswdigit(ch); }
00132 static ss_bool_t is_xdigit(char_type ch) { return 0 != ::iswxdigit(ch); }
00133 static ss_bool_t is_space(char_type ch) { return 0 != ::iswspace(ch); }
00134 static ss_bool_t is_punct(char_type ch) { return 0 != ::iswpunct(ch); }
00135 static ss_bool_t is_alnum(char_type ch) { return 0 != ::iswalnum(ch); }
00136 static ss_bool_t is_print(char_type ch) { return 0 != ::iswprint(ch); }
00137 static ss_bool_t is_graph(char_type ch) { return 0 != ::iswgraph(ch); }
00138 static ss_bool_t is_cntrl(char_type ch) { return 0 != ::iswcntrl(ch); }
00139 static char_type to_upper(char_type ch) { return static_cast<char_type>(::toupper(ch)); }
00140 static char_type to_lower(char_type ch) { return static_cast<char_type>(::tolower(ch)); }
00141 };
00142
00143 #endif
00144
00145
00146
00147 #ifndef _STLSOFT_NO_NAMESPACE
00148 }
00149 #endif
00150
00151
00152
00153 #endif
00154
00155