File indexing completed on 2025-02-22 09:55:53
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_STRING_CASE_CONV_HPP
0012 #define BOOST_STRING_CASE_CONV_HPP
0013
0014 #include <boost/algorithm/string/config.hpp>
0015 #include <algorithm>
0016 #include <locale>
0017 #include <boost/iterator/transform_iterator.hpp>
0018
0019 #include <boost/range/as_literal.hpp>
0020 #include <boost/range/begin.hpp>
0021 #include <boost/range/end.hpp>
0022 #include <boost/range/value_type.hpp>
0023
0024 #include <boost/algorithm/string/detail/case_conv.hpp>
0025
0026
0027
0028
0029
0030
0031
0032 namespace boost {
0033 namespace algorithm {
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053 template<typename OutputIteratorT, typename RangeT>
0054 inline OutputIteratorT
0055 to_lower_copy(
0056 OutputIteratorT Output,
0057 const RangeT& Input,
0058 const std::locale& Loc=std::locale())
0059 {
0060 return ::boost::algorithm::detail::transform_range_copy(
0061 Output,
0062 ::boost::as_literal(Input),
0063 ::boost::algorithm::detail::to_lowerF<
0064 typename range_value<RangeT>::type >(Loc));
0065 }
0066
0067
0068
0069
0070
0071 template<typename SequenceT>
0072 inline SequenceT to_lower_copy(
0073 const SequenceT& Input,
0074 const std::locale& Loc=std::locale())
0075 {
0076 return ::boost::algorithm::detail::transform_range_copy<SequenceT>(
0077 Input,
0078 ::boost::algorithm::detail::to_lowerF<
0079 typename range_value<SequenceT>::type >(Loc));
0080 }
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090 template<typename WritableRangeT>
0091 inline void to_lower(
0092 WritableRangeT& Input,
0093 const std::locale& Loc=std::locale())
0094 {
0095 ::boost::algorithm::detail::transform_range(
0096 ::boost::as_literal(Input),
0097 ::boost::algorithm::detail::to_lowerF<
0098 typename range_value<WritableRangeT>::type >(Loc));
0099 }
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118 template<typename OutputIteratorT, typename RangeT>
0119 inline OutputIteratorT
0120 to_upper_copy(
0121 OutputIteratorT Output,
0122 const RangeT& Input,
0123 const std::locale& Loc=std::locale())
0124 {
0125 return ::boost::algorithm::detail::transform_range_copy(
0126 Output,
0127 ::boost::as_literal(Input),
0128 ::boost::algorithm::detail::to_upperF<
0129 typename range_value<RangeT>::type >(Loc));
0130 }
0131
0132
0133
0134
0135
0136 template<typename SequenceT>
0137 inline SequenceT to_upper_copy(
0138 const SequenceT& Input,
0139 const std::locale& Loc=std::locale())
0140 {
0141 return ::boost::algorithm::detail::transform_range_copy<SequenceT>(
0142 Input,
0143 ::boost::algorithm::detail::to_upperF<
0144 typename range_value<SequenceT>::type >(Loc));
0145 }
0146
0147
0148
0149
0150
0151
0152
0153
0154
0155 template<typename WritableRangeT>
0156 inline void to_upper(
0157 WritableRangeT& Input,
0158 const std::locale& Loc=std::locale())
0159 {
0160 ::boost::algorithm::detail::transform_range(
0161 ::boost::as_literal(Input),
0162 ::boost::algorithm::detail::to_upperF<
0163 typename range_value<WritableRangeT>::type >(Loc));
0164 }
0165
0166 }
0167
0168
0169 using algorithm::to_lower;
0170 using algorithm::to_lower_copy;
0171 using algorithm::to_upper;
0172 using algorithm::to_upper_copy;
0173
0174 }
0175
0176 #endif