14 #ifndef __UT_STDUTIL_H_INCLUDED__
15 #define __UT_STDUTIL_H_INCLUDED__
37 for (
exint i = 0,
n = src.size(); i <
n; ++i)
43 UTarrayToStdVector(
const UT_Array<T> &src, std::vector<T> &dst)
46 dst.reserve(src.
size());
48 dst.push_back(src[i]);
57 for (
exint i = 0,
n = src.size(); i <
n; ++i)
62 UTarrayToStdVectorOfStrings(
66 dst.reserve(src.
size());
68 dst.push_back(src[i].toStdString());
72 UTargsToStringVector(
const UT_WorkArgs &src, std::vector<std::string> &dst)
77 dst.push_back(src.
getArg(i));
80 template <
typename T, ex
int SIZE>
81 static inline std::vector<T>
91 static inline std::vector<T>
94 std::vector<T>
dst(3);
95 for (
exint i = 0; i < 3; ++i)
100 template <
typename T>
101 static inline std::vector<T>
104 std::vector<T>
dst(2);
105 for (
exint i = 0; i < 2; ++i)
110 template <
typename T>
111 static inline std::vector<T>
114 std::vector<T>
dst(4);
115 for (
exint i = 0; i < 4; ++i)
123 return UT_StringView(str.c_str(), str.c_str() + str.length());
126 #endif // __UT_STDUTIL_H_INCLUDED__
GLsizei const GLchar *const * string
A utility class to do read-only operations on a subset of an existing string.
const char * getArg(int idx) const
void setCapacityIfNeeded(exint min_capacity)
void UTarrayFromStdVectorOfStrings(UT_Array< UT_StringHolder > &dst, const std::vector< std::string > &src)
void clear()
Resets list to an empty list.