37#ifndef Foam_stringOpsSort_H
38#define Foam_stringOpsSort_H
58int natstrcmp(
const char* s1,
const char* s2);
68 const std::string& s1,
76 static inline bool less
78 const std::string& s1,
88 const std::string& s1,
96 bool operator()(
const std::string& s1,
const std::string& s2)
const
105 bool operator()(
const std::string& s1,
const std::string& s2)
const
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Collection of static functions for various string-related operations.
int natstrcmp(const char *s1, const char *s2)
'Natural' compare for C-strings
void reverse(UList< T > &list, const label n)
Reverse the first n elements of the list.
A Ulist compare binary predicate for reverse natural sort.
bool operator()(label a, label b) const
list_greater(const UList< T > &list) noexcept
const UList< T > & values
A UList compare binary predicate for natural sort.
bool operator()(label a, label b) const
list_less(const UList< T > &list) noexcept
const UList< T > & values
bool operator()(const std::string &s1, const std::string &s2) const
Reverse natural sorting.
Encapsulation of natural order sorting for algorithms.
static bool greater(const std::string &s1, const std::string &s2)
Natural compare two strings for a greater-than relationship.
static int compare(const std::string &s1, const std::string &s2)
Natural compare for std::string.
static bool less(const std::string &s1, const std::string &s2)
Natural compare two strings for a less-than relationship.
bool operator()(const std::string &s1, const std::string &s2) const
Default (forward) natural sorting.