Type traits for case-insensitive string comparison, usable with algorithms that accept an STL std::char_traits.
More...
#include "donner/base/StringUtils.h"
|
| static bool | eq (char lhs, char rhs) |
| | Compare two characters for equality.
|
| static bool | ne (char lhs, char rhs) |
| | Compare two characters for inequality.
|
| static bool | lt (char lhs, char rhs) |
| | Compare two characters for less-than.
|
| static int | compare (const char *lhs, const char *rhs, size_t sizeToCompare) |
| | Compare two strings for equality, returning -1 if lhs is less than rhs, 0 if they are equal, or 1 if lhs is greater than rhs.
|
| static const char * | find (const char *str, size_t size, char ch) |
| | Find the first occurrence of a character in a string using a case-insensitive match.
|
Type traits for case-insensitive string comparison, usable with algorithms that accept an STL std::char_traits.
◆ compare()
| int donner::CaseInsensitiveCharTraits::compare |
( |
const char * | lhs, |
|
|
const char * | rhs, |
|
|
size_t | sizeToCompare ) |
|
inlinestatic |
Compare two strings for equality, returning -1 if lhs is less than rhs, 0 if they are equal, or 1 if lhs is greater than rhs.
- Parameters
-
| lhs | Left-hand side string. |
| rhs | Right-hand side string. |
| sizeToCompare | The number of characters to compare. |
◆ eq()
| bool donner::CaseInsensitiveCharTraits::eq |
( |
char | lhs, |
|
|
char | rhs ) |
|
inlinestatic |
Compare two characters for equality.
- Parameters
-
| lhs | Left-hand side character. |
| rhs | Right-hand side character. |
◆ find()
| const char * donner::CaseInsensitiveCharTraits::find |
( |
const char * | str, |
|
|
size_t | size, |
|
|
char | ch ) |
|
inlinestatic |
Find the first occurrence of a character in a string using a case-insensitive match.
- Parameters
-
| str | The string to search. |
| size | The size of the string. |
| ch | The character to search for. |
◆ lt()
| bool donner::CaseInsensitiveCharTraits::lt |
( |
char | lhs, |
|
|
char | rhs ) |
|
inlinestatic |
Compare two characters for less-than.
- Parameters
-
| lhs | Left-hand side character. |
| rhs | Right-hand side character. |
◆ ne()
| bool donner::CaseInsensitiveCharTraits::ne |
( |
char | lhs, |
|
|
char | rhs ) |
|
inlinestatic |
Compare two characters for inequality.
- Parameters
-
| lhs | Left-hand side character. |
| rhs | Right-hand side character. |
The documentation for this struct was generated from the following file: