10 #ifndef __UT_StringArray_h__
11 #define __UT_StringArray_h__
21 #include <type_traits>
65 void sort(
bool forward,
bool numbered);
91 template <
typename ComparatorBool,
92 typename = IsBoolComp<ComparatorBool>>
93 void sort(ComparatorBool is_less)
98 bool numbered =
true);
100 template <
typename Compare>
110 bool numbered =
true)
const;
112 exint getLongestPrefixLength()
const;
123 void join(
const char *sep,
const char *sep_last,
125 void join(
const char *sep,
const char *sep_last,
131 unsigned hash()
const;
133 template <
typename I>
141 { return ::strcmp(myValues(a), myValues(b)) < 0; }
146 template <
typename I>
150 std::stable_sort(indices.
getArray(),
158 template <
typename T>
159 struct DefaultClearer;
170 static const bool clearNeedsDestruction =
false;
174 #endif // __UT_StringArray_h__
bool operator()(I a, I b) const
exint sortedFind(const UT_StringRef &str, Comparator compare) const
GLsizei GLenum const void * indices
#define SYS_PRAGMA_PUSH_WARN()
OIIO_UTIL_API bool remove(string_view path, std::string &err)
UT_StringArray(const Parent &src)
#define SYS_DEPRECATED_HDK_REPLACE(__V__, __R__)
GLboolean GLboolean GLboolean GLboolean a
static void clear(UT_StringArray &v)
void setCapacity(exint new_capacity)
**But if you need a result
exint find(const S &s, exint start=0) const
#define SYS_PRAGMA_DISABLE_DEPRECATED()
IndexedCompare(const UT_StringArray &values)
CompareResults OIIO_API compare(const ImageBuf &A, const ImageBuf &B, float failthresh, float warnthresh, ROI roi={}, int nthreads=0)
void sort(ComparatorBool is_less={})
Sort using std::sort with bool comparator. Defaults to operator<().
SYS_FORCE_INLINE const UT_StringHolder & UTmakeUnsafeRef(const UT_StringRef &ref)
Convert a UT_StringRef into a UT_StringHolder that is a shallow reference.
exint sortedInsert(const T &t, Comparator compare)
#define SYS_PRAGMA_POP_WARN()
GLboolean GLboolean GLboolean b
UT_StringArray(Parent &&src) noexcept
void sort(ComparatorBool is_less)
Sort string array using custom comparator.
GLenum GLsizei GLsizei GLint * values
void stableSortIndices(UT_Array< I > &indices) const
void sortedInsert(const char *str, Compare is_less)
static bool isClear(const UT_StringArray &v)
static void clearConstruct(UT_StringArray *p)
void sort(I begin, I end, const Pred &pred)
FMT_CONSTEXPR auto find(Ptr first, Ptr last, T value, Ptr &out) -> bool
exint sortedFind(const T &t, Comparator compare) const