123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- #ifndef BOOST_STRING_CASE_CONV_HPP
- #define BOOST_STRING_CASE_CONV_HPP
- #include <boost/algorithm/string/config.hpp>
- #include <algorithm>
- #include <locale>
- #include <boost/iterator/transform_iterator.hpp>
- #include <boost/range/as_literal.hpp>
- #include <boost/range/begin.hpp>
- #include <boost/range/end.hpp>
- #include <boost/range/value_type.hpp>
- #include <boost/algorithm/string/detail/case_conv.hpp>
- namespace boost {
- namespace algorithm {
-
-
- template<typename OutputIteratorT, typename RangeT>
- inline OutputIteratorT
- to_lower_copy(
- OutputIteratorT Output,
- const RangeT& Input,
- const std::locale& Loc=std::locale())
- {
- return ::boost::algorithm::detail::transform_range_copy(
- Output,
- ::boost::as_literal(Input),
- ::boost::algorithm::detail::to_lowerF<
- typename range_value<RangeT>::type >(Loc));
- }
-
-
- template<typename SequenceT>
- inline SequenceT to_lower_copy(
- const SequenceT& Input,
- const std::locale& Loc=std::locale())
- {
- return ::boost::algorithm::detail::transform_range_copy<SequenceT>(
- Input,
- ::boost::algorithm::detail::to_lowerF<
- typename range_value<SequenceT>::type >(Loc));
- }
-
-
- template<typename WritableRangeT>
- inline void to_lower(
- WritableRangeT& Input,
- const std::locale& Loc=std::locale())
- {
- ::boost::algorithm::detail::transform_range(
- ::boost::as_literal(Input),
- ::boost::algorithm::detail::to_lowerF<
- typename range_value<WritableRangeT>::type >(Loc));
- }
-
-
-
- template<typename OutputIteratorT, typename RangeT>
- inline OutputIteratorT
- to_upper_copy(
- OutputIteratorT Output,
- const RangeT& Input,
- const std::locale& Loc=std::locale())
- {
- return ::boost::algorithm::detail::transform_range_copy(
- Output,
- ::boost::as_literal(Input),
- ::boost::algorithm::detail::to_upperF<
- typename range_value<RangeT>::type >(Loc));
- }
-
-
- template<typename SequenceT>
- inline SequenceT to_upper_copy(
- const SequenceT& Input,
- const std::locale& Loc=std::locale())
- {
- return ::boost::algorithm::detail::transform_range_copy<SequenceT>(
- Input,
- ::boost::algorithm::detail::to_upperF<
- typename range_value<SequenceT>::type >(Loc));
- }
-
-
- template<typename WritableRangeT>
- inline void to_upper(
- WritableRangeT& Input,
- const std::locale& Loc=std::locale())
- {
- ::boost::algorithm::detail::transform_range(
- ::boost::as_literal(Input),
- ::boost::algorithm::detail::to_upperF<
- typename range_value<WritableRangeT>::type >(Loc));
- }
- }
-
- using algorithm::to_lower;
- using algorithm::to_lower_copy;
- using algorithm::to_upper;
- using algorithm::to_upper_copy;
- }
- #endif
|