File indexing completed on 2025-01-18 09:39:15
0001
0002
0003
0004
0005
0006
0007 #ifndef BOOST_LOCALE_UTIL_STRING_HPP
0008 #define BOOST_LOCALE_UTIL_STRING_HPP
0009
0010 #include <boost/locale/config.hpp>
0011 #include <limits>
0012
0013 namespace boost { namespace locale { namespace util {
0014
0015 template<typename Char>
0016 Char* str_end(Char* str)
0017 {
0018 while(*str)
0019 ++str;
0020 return str;
0021 }
0022
0023 inline constexpr bool is_upper_ascii(const char c)
0024 {
0025 return 'A' <= c && c <= 'Z';
0026 }
0027
0028 inline constexpr bool is_lower_ascii(const char c)
0029 {
0030 return 'a' <= c && c <= 'z';
0031 }
0032
0033 inline constexpr bool is_numeric_ascii(const char c)
0034 {
0035 return '0' <= c && c <= '9';
0036 }
0037
0038
0039 constexpr char to_char(unsigned char c)
0040 {
0041 return static_cast<char>((c - (std::numeric_limits<char>::min)()) + (std::numeric_limits<char>::min)());
0042 }
0043
0044 }}}
0045
0046 #endif