public member function
<regex>

std::regex_traits::translate_nocase

char_type translate_nocase (char_type c) const;
Translate character (case insensitive)
Returns the case-insensitive character translation of c.

For the standard regex_traits, the ctype::tolower facet is used:
1
2
3
char_type translate_nocase (char_type c) const {
  return use_facet< ctype<char_type> >(getloc()).tolower(c);
}


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

Parameters

c
A character.
char_type is a member type, alias of the character type. In regex_traits it is an alias of its template parameter (charT).

Return value

The case-insensitive character translation of c.
char_type is a member type, alias of the character type. In regex_traits it is an alias of its template parameter (charT).

See also