proxygen
folly::AsciiCaseInsensitive Struct Reference

#include <Range.h>

Public Member Functions

bool operator() (char lhs, char rhs) const
 

Detailed Description

Check if two ascii characters are case insensitive equal. The difference between the lower/upper case characters are the 6-th bit. We also check they are alpha chars, in case of xor = 32.

Definition at line 1381 of file Range.h.

Member Function Documentation

bool folly::AsciiCaseInsensitive::operator() ( char  lhs,
char  rhs 
) const
inline

Definition at line 1382 of file Range.h.

References k, and folly::detail::rhs.

1382  {
1383  char k = lhs ^ rhs;
1384  if (k == 0) {
1385  return true;
1386  }
1387  if (k != 32) {
1388  return false;
1389  }
1390  k = lhs | rhs;
1391  return (k >= 'a' && k <= 'z');
1392  }
FOLLY_PUSH_WARNING RHS rhs
Definition: Traits.h:649
KeyT k

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