C++ Mathematical Expression Toolkit (ExprTk) release
Loading...
Searching...
No Matches
Public Member Functions | List of all members
exprtk::details::ilesscompare Struct Reference

#include <exprtk.hpp>

Public Member Functions

bool operator() (const std::string &s1, const std::string &s2) const
 

Detailed Description

Definition at line 213 of file exprtk.hpp.

Member Function Documentation

◆ operator()()

bool exprtk::details::ilesscompare::operator() ( const std::string &  s1,
const std::string &  s2 
) const
inline

Definition at line 215 of file exprtk.hpp.

216 {
217 const std::size_t length = std::min(s1.size(),s2.size());
218
219 for (std::size_t i = 0; i < length; ++i)
220 {
221 const char_t c1 = static_cast<char_t>(std::tolower(s1[i]));
222 const char_t c2 = static_cast<char_t>(std::tolower(s2[i]));
223
224 if (c1 < c2)
225 return true;
226 else if (c2 < c1)
227 return false;
228 }
229
230 return s1.size() < s2.size();
231 }
bool match_impl(const Iterator pattern_begin, const Iterator pattern_end, const Iterator data_begin, const Iterator data_end, const typename std::iterator_traits< Iterator >::value_type &zero_or_more, const typename std::iterator_traits< Iterator >::value_type &exactly_one)
Definition exprtk.hpp:598

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