Boost.Locale
string.hpp
1 //
2 // Copyright (c) 2022-2023 Alexander Grund
3 //
4 // Distributed under the Boost Software License, Version 1.0.
5 // https://www.boost.org/LICENSE_1_0.txt
6 
7 #ifndef BOOST_LOCALE_UTIL_STRING_HPP
8 #define BOOST_LOCALE_UTIL_STRING_HPP
9 
10 #include <boost/locale/config.hpp>
11 
12 namespace boost { namespace locale { namespace util {
14  template<typename Char>
15  Char* str_end(Char* str)
16  {
17  while(*str)
18  ++str;
19  return str;
20  }
21 
22  inline bool is_upper_ascii(const char c)
23  {
24  return 'A' <= c && c <= 'Z';
25  }
26 
27  inline bool is_lower_ascii(const char c)
28  {
29  return 'a' <= c && c <= 'z';
30  }
31 
32  inline bool is_numeric_ascii(const char c)
33  {
34  return '0' <= c && c <= '9';
35  }
36 
37 }}} // namespace boost::locale::util
38 
39 #endif
Char * str_end(Char *str)
Return the end of a C-string, i.e. the pointer to the trailing NULL byte.
Definition: string.hpp:15