Anope IRC Services  Version 2.0
Static Public Member Functions
ci::ci_char_traits Struct Reference

#include <hashcomp.h>

Inheritance diagram for ci::ci_char_traits:
Inheritance graph
[legend]
Collaboration diagram for ci::ci_char_traits:
Collaboration graph
[legend]

Static Public Member Functions

static bool eq (char c1st, char c2nd)
 
static bool ne (char c1st, char c2nd)
 
static bool lt (char c1st, char c2nd)
 
static int compare (const char *str1, const char *str2, size_t n)
 
static const char * find (const char *s1, int n, char c)
 

Detailed Description

The ci_char_traits class is used for ASCII-style comparison of strings. This class is used to implement ci::string, a case-insensitive, ASCII- comparing string class.

Definition at line 90 of file hashcomp.h.

Member Function Documentation

int ci::ci_char_traits::compare ( const char *  str1,
const char *  str2,
size_t  n 
)
static

Compare two strings of size n.

Parameters
str1First string
str2Second string
nLength to compare to
Returns
similar to strcmp, zero for equal, less than zero for str1 being less and greater than zero for str1 being greater than str2.

Definition at line 63 of file hashcomp.cpp.

bool ci::ci_char_traits::eq ( char  c1st,
char  c2nd 
)
static

Check if two chars match.

Parameters
c1stFirst character
c2ndSecond character
Returns
true if the characters are equal

Definition at line 48 of file hashcomp.cpp.

const char * ci::ci_char_traits::find ( const char *  s1,
int  n,
char  c 
)
static

Find a char within a string up to position n.

Parameters
s1String to find in
nPosition to search up to
cCharacter to search for
Returns
Pointer to the first occurance of c in s1

Definition at line 83 of file hashcomp.cpp.

bool ci::ci_char_traits::lt ( char  c1st,
char  c2nd 
)
static

Check if one char is less than another.

Parameters
c1stFirst character
c2ndSecond character
Returns
true if c1st is less than c2nd

Definition at line 58 of file hashcomp.cpp.

bool ci::ci_char_traits::ne ( char  c1st,
char  c2nd 
)
static

Check if two chars do NOT match.

Parameters
c1stFirst character
c2ndSecond character
Returns
true if the characters are unequal

Definition at line 53 of file hashcomp.cpp.


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