22 #ifndef GEARS_STRING_CLASSIFICATION_HPP
23 #define GEARS_STRING_CLASSIFICATION_HPP
48 is_lower(
const std::locale& loc = std::locale()): loc(loc) {}
50 template<
typename CharT>
51 bool operator()(CharT c)
const {
52 return std::islower(c, loc);
69 is_upper(
const std::locale& loc = std::locale()): loc(loc) {}
71 template<
typename CharT>
72 bool operator()(CharT c)
const {
73 return std::isupper(c, loc);
90 is_space(
const std::locale& loc = std::locale()): loc(loc) {}
92 template<
typename CharT>
93 bool operator()(CharT c)
const {
94 return std::isspace(c, loc);
111 is_cntrl(
const std::locale& loc = std::locale()): loc(loc) {}
113 template<
typename CharT>
114 bool operator()(CharT c)
const {
115 return std::iscntrl(c, loc);
132 is_alpha(
const std::locale& loc = std::locale()): loc(loc) {}
134 template<
typename CharT>
135 bool operator()(CharT c)
const {
136 return std::isalpha(c, loc);
153 is_digit(
const std::locale& loc = std::locale()): loc(loc) {}
155 template<
typename CharT>
156 bool operator()(CharT c)
const {
157 return std::isdigit(c, loc);
174 is_punct(
const std::locale& loc = std::locale()): loc(loc) {}
176 template<
typename CharT>
177 bool operator()(CharT c)
const {
178 return std::ispunct(c, loc);
195 is_alnum(
const std::locale& loc = std::locale()): loc(loc) {}
197 template<
typename CharT>
198 bool operator()(CharT c)
const {
199 return std::isalnum(c, loc);
216 is_print(
const std::locale& loc = std::locale()): loc(loc) {}
218 template<
typename CharT>
219 bool operator()(CharT c)
const {
220 return std::isprint(c, loc);
237 is_graph(
const std::locale& loc = std::locale()): loc(loc) {}
239 template<
typename CharT>
240 bool operator()(CharT c)
const {
241 return std::isgraph(c, loc);
258 is_xdigit(
const std::locale& loc = std::locale()): loc(loc) {}
260 template<
typename CharT>
261 bool operator()(CharT c)
const {
262 return std::isxdigit(c, loc);
268 #endif // GEARS_STRING_CLASSIFICATION_HPP