Ookii.CommandLine for C++  2.0.0
Public Types | Public Member Functions | List of all members
ookii::char_less Struct Reference

A version of the std::less predicate for characters that supports case insensitive comparison. More...

#include <ookii/string_helper.h>

Public Types

using is_transparent = int
 Indicates that this function accepts any type and uses perfect forwarding.
 

Public Member Functions

 char_less (bool case_sensitive=true, std::locale loc={})
 Initializes a new instance of the char_less class. More...
 
template<typename CharType >
bool operator() (CharType &&left, CharType &&right) const
 Compares two characters. More...
 

Detailed Description

A version of the std::less predicate for characters that supports case insensitive comparison.

Constructor & Destructor Documentation

◆ char_less()

ookii::char_less::char_less ( bool  case_sensitive = true,
std::locale  loc = {} 
)
inline

Initializes a new instance of the char_less class.

Parameters
case_sensitivetrue to perform case sensitive comparisons; false to perform case insensitive comparisons.
locThe locale to use for case insensitive comparisons. This is not used for case sensitive comparisons.

Member Function Documentation

◆ operator()()

template<typename CharType >
bool ookii::char_less::operator() ( CharType &&  left,
CharType &&  right 
) const
inline

Compares two characters.

Template Parameters
CharTypeThe type of the characters.
Parameters
leftThe first character.
rightThe second character.
Returns
true if left is less than right; otherwise, false.

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