Boost.Locale: boost::locale::conv::narrow_converter Class Reference

| Boost.Locale

Public Member Functions | List of all members
boost::locale::conv::narrow_converter Class Reference

## Public Member Functions
| narrow_converter (const std::string &src_encoding, const std::string &target_encoding, method_type how=default_method)
std::string | convert (const char *begin, const char *end) const
std::string | convert (const boost::string_view &text) const
std::string | operator() (const boost::string_view &text) const

## Constructor & Destructor Documentation

## ◆ narrow_converter()

boost::locale::conv::narrow_converter::narrow_converter | ( | const std::string & | src_encoding,
|  | const std::string & | target_encoding,
|  | method_type | how = `default_method`
| ) |  |
| inline

Create converter to convert text from src_encoding to target_encoding according to policy how

Exceptions

  invalid_charset_error | Either character set is not supported

## Member Function Documentation

## ◆ convert() [1/2]

std::string boost::locale::conv::narrow_converter::convert | ( | const boost::string_view & | text | ) | const
| inline

Convert text

Exceptions

  conversion_error | Conversion failed

## ◆ convert() [2/2]

std::string boost::locale::conv::narrow_converter::convert | ( | const char * | begin,
|  | const char * | end
| ) |  | const
| inline

Convert text in range [begin,end)

Exceptions

  conversion_error | Conversion failed

## ◆ operator()()

std::string boost::locale::conv::narrow_converter::operator() | ( | const boost::string_view & | text | ) | const
| inline

Convert text

Exceptions

  conversion_error | Conversion failed

The documentation for this class was generated from the following file:

- boost/locale/encoding.hpp

- © Copyright 2009-2012 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.