ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
hash_string_ignore_case< TChar > Struct Template Reference

Description:

template<typename TChar = characters::character>
struct alib::strings::compatibility::std::hash_string_ignore_case< TChar >

Functor that can be used as an explicitly given replacement for std::hash with template types (containers) found in namespace std.
While the specialization of std::hash for type String , which is used by the default values of template arguments of the corresponding types in namespace std, performs a case sensitive hash code calculation, this version creates the same hash code for two strings that only differ in the letter case of one or more characters.

Note that this specialization can also be used in combination with derived string types, like AString .

This functor is provided with the inclusion of header file alib/compatibility/std_strings_functional.hpp .

Note
While the documentation indicates namespace alib::strings::compatibility::std, the true location is namespace std (as mandatory).
Template Parameters
TCharThe character type of the string. Defaults to character .

Definition at line 178 of file std_strings_functional.hpp.

#include <std_strings_functional.hpp>

Public Method Index:

size_t operator() (const strings::TString< TChar > &src) const
 

Method Details:

◆ operator()()

template<typename TChar = characters::character>
size_t operator() ( const strings::TString< TChar > & src) const
inline

Calculates the hash code ALib strings, ignoring the letter case.

Parameters
srcThe string object to hash.
Returns
The hash code.

Definition at line 185 of file std_strings_functional.hpp.

Here is the call graph for this function:

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