public member function
<regex>

std::regex_traits::translate

char_type translate (char_type c) const;
Translate character
Returns the character translation of c.

For the standard regex_traits, this function simply returns c unchanged.

This function is called when a regular expression needs to match a character and the regex object has collate as a syntax option. A custom traits class can define a different internal translation: Two characters will be considered equivalent if they translate to the same value using this function.

参数

c
一个字符。
char_type是一个成员类型,是字符类型的别名。 在regex_traits中,它是其模板参数的别名(charT).

返回值

The character translation of c.
char_type是一个成员类型,是字符类型的别名。 在regex_traits中,它是其模板参数的别名(charT).

另见