The internal class of translation tables, used with methods CppStringT::maketrans and CppStringT::translate.
More...
|
| std::map< typename key_type, typename value_type > & | get_table () noexcept |
| | < for tests purposes
|
| TransTable & | operator= (const std::map< key_type, value_type > &trans_table) noexcept |
| | Assignment operator with a standard map.
|
| TransTable & | operator= (const TransTable &) noexcept=default |
| | Default copy assignment.
|
| TransTable & | operator= (TransTable &&) noexcept=default |
| | Default move assignment.
|
| value_type | operator[] (const key_type ch) noexcept |
| | Indexing operator.
|
| | TransTable () noexcept=default |
| | Default empty constructor.
|
| | TransTable (const CharT *keys, const CharT *values) |
| | Creates a TransTable from two pointers to null-terminated lists of characters (#6).
|
| | TransTable (const CharT *keys, const CharT *values, const CharT *not_translated) |
| | Creates a TransTable from three pointers to null-terminated lists of characters (#7).
|
| | TransTable (const CppStringT &keys, const CppStringT &values) |
| | Creates a TransTable from two strings (#2).
|
| | TransTable (const CppStringT &keys, const CppStringT &values, const CppStringT ¬_translated) |
| | Creates a TransTable from three strings (#3).
|
| | TransTable (const CppStringT &keys, const std::initializer_list< CppStringT > &values) |
| | Creates a TransTable from a string and an initalization list (#4).
|
| | TransTable (const CppStringT &keys, const std::initializer_list< CppStringT > values, const CppStringT ¬_translated) |
| | Creates a TransTable from a string, an initalization list and a string (#5).
|
| | TransTable (const std::map< key_type, value_type > trans_table) |
| | Creates a TransTable from a standard map (#1).
|
| template<class StringViewLike> |
| | TransTable (const StringViewLike &keys, const StringViewLike &values) |
| | Creates a TransTable from two string views (#10).
|
| | TransTable (const TransTable &) noexcept=default |
| | Default copy constructor.
|
| template<class Key1It, class ValueIt, class Key2It> |
| | TransTable (Key1It first_key, Key1It last_key, ValueIt first_value, ValueIt last_value, Key2It first_not_translated, Key2It last_not_translated) |
| | Creates a TransTable from three containers iterators (#9).
|
| template<class KeyIt, class ValueIt> |
| | TransTable (KeyIt first_key, KeyIt last_key, ValueIt first_value, ValueIt last_value) |
| | Creates a TransTable from two containers iterators (#8).
|
| | TransTable (TransTable &&) noexcept=default |
| | Default move constructor.
|
| | ~TransTable () noexcept=default |
| | Default descrtuctor.
|
template<class CharT, class TraitsT, class AllocatorT>
class pcs::CppStringT< CharT, TraitsT, AllocatorT >::TransTable
The internal class of translation tables, used with methods CppStringT::maketrans and CppStringT::translate.
template<class CharT, class TraitsT, class AllocatorT>
Creates a TransTable from three strings (#3).
Parameters keys and values must have the same size. The i-th character in key is associated in the translation table with the i -th character in values. Finally, the characters contained in string not_translated are associated in the translation table with the empty string.
template<class CharT, class TraitsT, class AllocatorT>
Creates a TransTable from a string, an initalization list and a string (#5).
Parameters keys and values must have the same size. The i-th character in key is associated in the translation table with the i -th character in values. Finally, the characters contained in string not_translated are associated in the translation table with the empty string.
template<class CharT, class TraitsT, class AllocatorT>
| pcs::CppStringT< CharT, TraitsT, AllocatorT >::TransTable::TransTable |
( |
const CharT * | keys, |
|
|
const CharT * | values, |
|
|
const CharT * | not_translated ) |
|
inline |
Creates a TransTable from three pointers to null-terminated lists of characters (#7).
Parameters keys and values must have the same size. The i-th character in key is associated in the translation table with the i -th entry in values. Finally, the characters contained in string not_translated are associated in the translation table with the empty string.
template<class CharT, class TraitsT, class AllocatorT>
template<class KeyIt, class ValueIt>
| pcs::CppStringT< CharT, TraitsT, AllocatorT >::TransTable::TransTable |
( |
KeyIt | first_key, |
|
|
KeyIt | last_key, |
|
|
ValueIt | first_value, |
|
|
ValueIt | last_value ) |
|
inline |
Creates a TransTable from two containers iterators (#8).
Both containers should have the same size. The i-th character in key is associated in the translation table with the i-th entry in values.
template<class CharT, class TraitsT, class AllocatorT>
template<class Key1It, class ValueIt, class Key2It>
| pcs::CppStringT< CharT, TraitsT, AllocatorT >::TransTable::TransTable |
( |
Key1It | first_key, |
|
|
Key1It | last_key, |
|
|
ValueIt | first_value, |
|
|
ValueIt | last_value, |
|
|
Key2It | first_not_translated, |
|
|
Key2It | last_not_translated ) |
|
inline |
Creates a TransTable from three containers iterators (#9).
Both containers should have the same size. The i-th character in key is associated in the translation table with the i -th character in values. Finally, the characters contained in string not_translated are associated in the translation table with the empty string.
template<class CharT, class TraitsT, class AllocatorT>
template<class StringViewLike>
| pcs::CppStringT< CharT, TraitsT, AllocatorT >::TransTable::TransTable |
( |
const StringViewLike & | keys, |
|
|
const StringViewLike & | values ) |
|
inlineexplicit |
Creates a TransTable from two string views (#10).
Parameters keys and values must have the same size. The i-th character in key is associated in the translation table with the i-th character in values.