tlx
less_icase.hpp
Go to the documentation of this file.
1
/*******************************************************************************
2
* tlx/string/less_icase.hpp
3
*
4
* Part of tlx - http://panthema.net/tlx
5
*
6
* Copyright (C) 2007-2019 Timo Bingmann <tb@panthema.net>
7
*
8
* All rights reserved. Published under the Boost Software License, Version 1.0
9
******************************************************************************/
10
11
#ifndef TLX_STRING_LESS_ICASE_HEADER
12
#define TLX_STRING_LESS_ICASE_HEADER
13
14
#include <string>
15
16
namespace
tlx
{
17
18
//! \addtogroup tlx_string
19
//! \{
20
21
/******************************************************************************/
22
// less_icase()
23
24
//! returns true if a < b without regard for letter case
25
bool
less_icase
(
const
char
* a,
const
char
* b);
26
27
//! returns true if a < b without regard for letter case
28
bool
less_icase
(
const
char
* a,
const
std::string& b);
29
30
//! returns true if a < b without regard for letter case
31
bool
less_icase
(
const
std::string& a,
const
char
* b);
32
33
//! returns true if a < b without regard for letter case
34
bool
less_icase
(
const
std::string& a,
const
std::string& b);
35
36
/******************************************************************************/
37
// order_less_icase: case-insensitive order relation functional classes
38
39
//! Case-insensitive less order relation functional class for std::map, etc.
40
struct
less_icase_asc {
41
inline
bool
operator ()
(
const
std::string& a,
const
std::string& b)
const
{
42
return
less_icase
(a, b);
43
}
44
};
45
46
//! Descending case-insensitive less order relation functional class for
47
//! std::map, etc.
48
struct
less_icase_desc
{
49
inline
bool
operator ()
(
const
std::string& a,
const
std::string& b)
const
{
50
return
!
less_icase
(a, b);
51
}
52
};
53
54
//! \}
55
56
}
// namespace tlx
57
58
#endif // !TLX_STRING_LESS_ICASE_HEADER
59
60
/******************************************************************************/
tlx::less_icase_desc
Descending case-insensitive less order relation functional class for std::map, etc.
Definition:
less_icase.hpp:56
tlx::less_icase
bool less_icase(const char *a, const char *b)
returns true if a < b without regard for letter case
Definition:
less_icase.cpp:26
tlx::less_icase_asc::operator()
bool operator()(const std::string &a, const std::string &b) const
Definition:
less_icase.hpp:49
tlx
Definition:
exclusive_scan.hpp:17
tlx::less_icase_desc::operator()
bool operator()(const std::string &a, const std::string &b) const
Definition:
less_icase.hpp:57
tlx
string
less_icase.hpp
Generated on Wed Jul 29 2020 00:00:00 for tlx by
1.8.18