Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Text Conversions

This module provides various function for string manipulation like Unicode normalization, case conversion etc. More...

Classes

class  boost::locale::converter_base
 This class provides base flags for text manipulation. More...
 
singleton  boost::locale::converter< CharType >
 
class  boost::locale::converter< char >
 
class  boost::locale::converter< wchar_t >
 

Enumerations

enum  boost::locale::converter_base::conversion_type {
  boost::locale::converter_base::normalization,
  boost::locale::converter_base::upper_case,
  boost::locale::converter_base::lower_case,
  boost::locale::converter_base::case_folding,
  boost::locale::converter_base::title_case
}
 The flag used for facet - the type of operation to perform. More...
 
enum  boost::locale::norm_type {
  boost::locale::norm_nfd,
  boost::locale::norm_nfc,
  boost::locale::norm_nfkd,
  boost::locale::norm_nfkc,
  boost::locale::norm_default = norm_nfc
}
 The type that defined normalization form More...
 

Functions

template<typename Geometry1 , typename Geometry2 >
void boost::geometry::convert (Geometry1 const &geometry1, Geometry2 &geometry2)
 Converts one geometry to another geometry. More...
 
template<typename CharType >
std::basic_string< CharType > boost::locale::normalize (std::basic_string< CharType > const &str, norm_type n=norm_default, std::locale const &loc=std::locale())
 Normalize Unicode string str according to normalization form n. More...
 
template<typename CharType >
std::basic_string< CharType > boost::locale::normalize (CharType const *str, norm_type n=norm_default, std::locale const &loc=std::locale())
 Normalize NUL terminated Unicode string str according to normalization form n. More...
 
template<typename CharType >
std::basic_string< CharType > boost::locale::normalize (CharType const *begin, CharType const *end, norm_type n=norm_default, std::locale const &loc=std::locale())
 Normalize Unicode string in range [begin,end) according to normalization form n. More...
 
template<typename CharType >
std::basic_string< CharType > boost::locale::to_upper (std::basic_string< CharType > const &str, std::locale const &loc=std::locale())
 Convert a string str to upper case according to locale loc. More...
 
template<typename CharType >
std::basic_string< CharType > boost::locale::to_upper (CharType const *str, std::locale const &loc=std::locale())
 Convert a NUL terminated string str to upper case according to locale loc. More...
 
template<typename CharType >
std::basic_string< CharType > boost::locale::to_upper (CharType const *begin, CharType const *end, std::locale const &loc=std::locale())
 Convert a string in range [begin,end) to upper case according to locale loc. More...
 
template<typename CharType >
std::basic_string< CharType > boost::locale::to_lower (std::basic_string< CharType > const &str, std::locale const &loc=std::locale())
 Convert a string str to lower case according to locale loc. More...
 
template<typename CharType >
std::basic_string< CharType > boost::locale::to_lower (CharType const *str, std::locale const &loc=std::locale())
 Convert a NUL terminated string str to lower case according to locale loc. More...
 
template<typename CharType >
std::basic_string< CharType > boost::locale::to_lower (CharType const *begin, CharType const *end, std::locale const &loc=std::locale())
 Convert a string in range [begin,end) to lower case according to locale loc. More...
 
template<typename CharType >
std::basic_string< CharType > boost::locale::to_title (std::basic_string< CharType > const &str, std::locale const &loc=std::locale())
 Convert a string str to title case according to locale loc. More...
 
template<typename CharType >
std::basic_string< CharType > boost::locale::to_title (CharType const *str, std::locale const &loc=std::locale())
 Convert a NUL terminated string str to title case according to locale loc. More...
 
template<typename CharType >
std::basic_string< CharType > boost::locale::to_title (CharType const *begin, CharType const *end, std::locale const &loc=std::locale())
 Convert a string in range [begin,end) to title case according to locale loc. More...
 
template<typename CharType >
std::basic_string< CharType > boost::locale::fold_case (std::basic_string< CharType > const &str, std::locale const &loc=std::locale())
 Fold case of a string str according to locale loc. More...
 
template<typename CharType >
std::basic_string< CharType > boost::locale::fold_case (CharType const *str, std::locale const &loc=std::locale())
 Fold case of a NUL terminated string str according to locale loc. More...
 
template<typename CharType >
std::basic_string< CharType > boost::locale::fold_case (CharType const *begin, CharType const *end, std::locale const &loc=std::locale())
 Fold case of a string in range [begin,end) according to locale loc. More...
 

Detailed Description

This module provides various function for string manipulation like Unicode normalization, case conversion etc.

Enumeration Type Documentation

The flag used for facet - the type of operation to perform.

Enumerator
normalization 

Apply Unicode normalization on the text.

upper_case 

Convert text to upper case.

lower_case 

Convert text to lower case.

case_folding 

Fold case in the text.

title_case 

Convert text to title case.

#include <boost_1_57_0/boost/locale/conversion.hpp>

The type that defined normalization form

Enumerator
norm_nfd 

Canonical decomposition.

norm_nfc 

Canonical decomposition followed by canonical composition.

norm_nfkd 

Compatibility decomposition.

norm_nfkc 

Compatibility decomposition followed by canonical composition.

norm_default 

Default normalization - canonical decomposition followed by canonical composition.

Function Documentation

template<typename Geometry1 , typename Geometry2 >
void boost::geometry::convert ( Geometry1 const &  geometry1,
Geometry2 &  geometry2 
)
inline

#include <boost_1_57_0/boost/geometry/algorithms/convert.hpp>

Converts one geometry to another geometry.

The convert algorithm converts one geometry, e.g. a BOX, to another geometry, e.g. a RING. This only works if it is possible and applicable. If the point-order is different, or the closure is different between two geometry types, it will be converted correctly by explicitly reversing the points or closing or opening the polygon rings.

Template Parameters
Geometry1
Geometry2
Parameters
geometry1(source)
geometry2(target)

{[include reference/algorithms/convert.qbk]}

References boost::geometry::resolve_variant::convert< Geometry1, Geometry2 >::apply().

Referenced by boost::geometry::strategy::distance::projected_point< CalculationType, Strategy >::apply(), boost::geometry::strategy::transform::copy_per_coordinate< P1, P2 >::apply(), boost::geometry::detail::centroid::centroid_point::apply(), boost::geometry::strategy::distance::detail::projected_point_ax< CalculationType, Strategy >::apply(), boost::geometry::dispatch::simplify< Point, point_tag >::apply(), boost::geometry::detail::wkt::wkt_box< Box >::apply(), boost::geometry::model::box< Point >::box(), and boost::geometry::detail::centroid::range_ok().

template<typename CharType >
std::basic_string<CharType> boost::locale::fold_case ( std::basic_string< CharType > const &  str,
std::locale const &  loc = std::locale() 
)

#include <boost_1_57_0/boost/locale/conversion.hpp>

Fold case of a string str according to locale loc.

Note
throws std::bad_cast if loc does not have converter facet installed

References boost::locale::converter_base::case_folding, and boost::filesystem::path_traits::convert().

template<typename CharType >
std::basic_string<CharType> boost::locale::fold_case ( CharType const *  str,
std::locale const &  loc = std::locale() 
)

#include <boost_1_57_0/boost/locale/conversion.hpp>

Fold case of a NUL terminated string str according to locale loc.

Note
throws std::bad_cast if loc does not have converter facet installed

References boost::locale::converter_base::case_folding, boost::filesystem::path_traits::convert(), and boost::str().

template<typename CharType >
std::basic_string<CharType> boost::locale::fold_case ( CharType const *  begin,
CharType const *  end,
std::locale const &  loc = std::locale() 
)

#include <boost_1_57_0/boost/locale/conversion.hpp>

Fold case of a string in range [begin,end) according to locale loc.

Note
throws std::bad_cast if loc does not have converter facet installed

References boost::locale::converter_base::case_folding, and boost::filesystem::path_traits::convert().

template<typename CharType >
std::basic_string<CharType> boost::locale::normalize ( std::basic_string< CharType > const &  str,
norm_type  n = norm_default,
std::locale const &  loc = std::locale() 
)

#include <boost_1_57_0/boost/locale/conversion.hpp>

Normalize Unicode string str according to normalization form n.

Note: This function receives only Unicode strings, i.e.: UTF-8, UTF-16 or UTF-32. It does not take in account the locale encoding, because Unicode decomposition and composition are meaningless outside of a Unicode character set.

Note
throws std::bad_cast if loc does not have converter facet installed

References boost::filesystem::path_traits::convert(), boost::n, and boost::locale::converter_base::normalization.

Referenced by boost::rational< IntType >::assign(), boost::bc_clustering_threshold< T >::bc_clustering_threshold(), boost::math::hyperexponential_distribution< RealT, PolicyT >::hyperexponential_distribution(), boost::random::discrete_distribution< IntType, WeightType >::param_type::param_type(), and boost::random::discrete_distribution< std::size_t, WeightType >::probabilities().

template<typename CharType >
std::basic_string<CharType> boost::locale::normalize ( CharType const *  str,
norm_type  n = norm_default,
std::locale const &  loc = std::locale() 
)

#include <boost_1_57_0/boost/locale/conversion.hpp>

Normalize NUL terminated Unicode string str according to normalization form n.

Note: This function receives only Unicode strings, i.e.: UTF-8, UTF-16 or UTF-32. It does not take in account the locale encoding, because Unicode decomposition and composition are meaningless outside of a Unicode character set.

Note
throws std::bad_cast if loc does not have converter facet installed

References boost::filesystem::path_traits::convert(), boost::end, boost::n, boost::locale::converter_base::normalization, and boost::str().

template<typename CharType >
std::basic_string<CharType> boost::locale::normalize ( CharType const *  begin,
CharType const *  end,
norm_type  n = norm_default,
std::locale const &  loc = std::locale() 
)

#include <boost_1_57_0/boost/locale/conversion.hpp>

Normalize Unicode string in range [begin,end) according to normalization form n.

Note: This function receives only Unicode strings, i.e.: UTF-8, UTF-16 or UTF-32. It does not take in account the locale encoding, because Unicode decomposition and composition are meaningless outside of a Unicode character set.

Note
throws std::bad_cast if loc does not have converter facet installed

References boost::filesystem::path_traits::convert(), boost::n, and boost::locale::converter_base::normalization.

template<typename CharType >
std::basic_string<CharType> boost::locale::to_lower ( std::basic_string< CharType > const &  str,
std::locale const &  loc = std::locale() 
)

#include <boost_1_57_0/boost/locale/conversion.hpp>

Convert a string str to lower case according to locale loc.

Note
throws std::bad_cast if loc does not have converter facet installed

References boost::filesystem::path_traits::convert(), and boost::locale::converter_base::lower_case.

template<typename CharType >
std::basic_string<CharType> boost::locale::to_lower ( CharType const *  str,
std::locale const &  loc = std::locale() 
)

#include <boost_1_57_0/boost/locale/conversion.hpp>

Convert a NUL terminated string str to lower case according to locale loc.

Note
throws std::bad_cast if loc does not have converter facet installed

References boost::filesystem::path_traits::convert(), boost::locale::converter_base::lower_case, and boost::str().

template<typename CharType >
std::basic_string<CharType> boost::locale::to_lower ( CharType const *  begin,
CharType const *  end,
std::locale const &  loc = std::locale() 
)

#include <boost_1_57_0/boost/locale/conversion.hpp>

Convert a string in range [begin,end) to lower case according to locale loc.

Note
throws std::bad_cast if loc does not have converter facet installed

References boost::filesystem::path_traits::convert(), and boost::locale::converter_base::lower_case.

template<typename CharType >
std::basic_string<CharType> boost::locale::to_title ( std::basic_string< CharType > const &  str,
std::locale const &  loc = std::locale() 
)

#include <boost_1_57_0/boost/locale/conversion.hpp>

Convert a string str to title case according to locale loc.

Note
throws std::bad_cast if loc does not have converter facet installed

References boost::filesystem::path_traits::convert(), and boost::locale::converter_base::title_case.

template<typename CharType >
std::basic_string<CharType> boost::locale::to_title ( CharType const *  str,
std::locale const &  loc = std::locale() 
)

#include <boost_1_57_0/boost/locale/conversion.hpp>

Convert a NUL terminated string str to title case according to locale loc.

Note
throws std::bad_cast if loc does not have converter facet installed

References boost::filesystem::path_traits::convert(), boost::str(), and boost::locale::converter_base::title_case.

template<typename CharType >
std::basic_string<CharType> boost::locale::to_title ( CharType const *  begin,
CharType const *  end,
std::locale const &  loc = std::locale() 
)

#include <boost_1_57_0/boost/locale/conversion.hpp>

Convert a string in range [begin,end) to title case according to locale loc.

Note
throws std::bad_cast if loc does not have converter facet installed

References boost::filesystem::path_traits::convert(), and boost::locale::converter_base::title_case.

template<typename CharType >
std::basic_string<CharType> boost::locale::to_upper ( std::basic_string< CharType > const &  str,
std::locale const &  loc = std::locale() 
)

#include <boost_1_57_0/boost/locale/conversion.hpp>

Convert a string str to upper case according to locale loc.

Note
throws std::bad_cast if loc does not have converter facet installed

References boost::filesystem::path_traits::convert(), and boost::locale::converter_base::upper_case.

template<typename CharType >
std::basic_string<CharType> boost::locale::to_upper ( CharType const *  str,
std::locale const &  loc = std::locale() 
)

#include <boost_1_57_0/boost/locale/conversion.hpp>

Convert a NUL terminated string str to upper case according to locale loc.

Note
throws std::bad_cast if loc does not have converter facet installed

References boost::filesystem::path_traits::convert(), boost::str(), and boost::locale::converter_base::upper_case.

template<typename CharType >
std::basic_string<CharType> boost::locale::to_upper ( CharType const *  begin,
CharType const *  end,
std::locale const &  loc = std::locale() 
)

#include <boost_1_57_0/boost/locale/conversion.hpp>

Convert a string in range [begin,end) to upper case according to locale loc.

Note
throws std::bad_cast if loc does not have converter facet installed

References boost::filesystem::path_traits::convert(), and boost::locale::converter_base::upper_case.