初始提交: UE5.3项目基础框架

This commit is contained in:
2025-10-14 11:14:54 +08:00
commit 721d9fd98e
5334 changed files with 316782 additions and 0 deletions

View File

@ -0,0 +1,47 @@
#pragma once
#include <numeric>
#include <string>
namespace CesiumUtility {
/**
* @brief Joins multiple elements together into a string, separated by a given
* separator.
*
* @tparam TIterator The type of the collection iterator.
* @param begin An iterator referring to the first element to join.
* @param end An iterator referring to one past the last element to join.
* @param separator The string to use to separate successive elements.
* @return The joined string.
*/
template <class TIterator>
std::string
joinToString(TIterator begin, TIterator end, const std::string& separator) {
if (begin == end)
return std::string();
std::string first = *begin;
return std::accumulate(
++begin,
end,
std::move(first),
[&separator](const std::string& acc, const std::string& element) {
return acc + separator + element;
});
}
/**
* @brief Joins multiple elements together into a string, separated by a given
* separator.
*
* @tparam TIterator The type of the collection iterator.
* @param collection The collection of elements to be joined.
* @param separator The string to use to separate successive elements.
* @return The joined string.
*/
template <class TCollection>
std::string joinToString(TCollection collection, const std::string& separator) {
return joinToString(collection.cbegin(), collection.cend(), separator);
}
} // namespace CesiumUtility