proxygen
wangle::dn_char_traits Struct Reference

#include <SSLContextSelectionMisc.h>

Inheritance diagram for wangle::dn_char_traits:

Static Public Member Functions

static bool eq (char c1, char c2)
 
static bool ne (char c1, char c2)
 
static bool lt (char c1, char c2)
 
static int compare (const char *s1, const char *s2, size_t n)
 
static const char * find (const char *s, size_t n, char a)
 

Detailed Description

Definition at line 29 of file SSLContextSelectionMisc.h.

Member Function Documentation

static int wangle::dn_char_traits::compare ( const char *  s1,
const char *  s2,
size_t  n 
)
inlinestatic

Definition at line 42 of file SSLContextSelectionMisc.h.

42  {
43  while (n--) {
44  if(::tolower(*s1) < ::tolower(*s2) ) {
45  return -1;
46  }
47  if(::tolower(*s1) > ::tolower(*s2) ) {
48  return 1;
49  }
50  ++s1;
51  ++s2;
52  }
53  return 0;
54  }
static bool wangle::dn_char_traits::eq ( char  c1,
char  c2 
)
inlinestatic

Definition at line 30 of file SSLContextSelectionMisc.h.

30  {
31  return ::tolower(c1) == ::tolower(c2);
32  }
static const char* wangle::dn_char_traits::find ( const char *  s,
size_t  n,
char  a 
)
inlinestatic

Definition at line 56 of file SSLContextSelectionMisc.h.

References s.

56  {
57  char la = ::tolower(a);
58  while (n--) {
59  if(::tolower(*s) == la) {
60  return s;
61  } else {
62  ++s;
63  }
64  }
65  return nullptr;
66  }
char a
static set< string > s
static bool wangle::dn_char_traits::lt ( char  c1,
char  c2 
)
inlinestatic

Definition at line 38 of file SSLContextSelectionMisc.h.

38  {
39  return ::tolower(c1) < ::tolower(c2);
40  }
static bool wangle::dn_char_traits::ne ( char  c1,
char  c2 
)
inlinestatic

Definition at line 34 of file SSLContextSelectionMisc.h.

34  {
35  return ::tolower(c1) != ::tolower(c2);
36  }

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