mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-07 08:15:59 -10:00
This new system allows to create a user interface that goes beyond the existing UI system.
22 lines
388 B
C++
22 lines
388 B
C++
#pragma once
|
|
|
|
#include "globalincs/pstypes.h"
|
|
|
|
namespace util {
|
|
|
|
template <typename Out>
|
|
void split_string(const SCP_string& s, char delim, Out result)
|
|
{
|
|
SCP_stringstream ss(s);
|
|
SCP_string item;
|
|
while (std::getline(ss, item, delim)) {
|
|
if (!item.empty()) {
|
|
*(result++) = item;
|
|
}
|
|
}
|
|
}
|
|
|
|
std::vector<std::string> split_string(const std::string& s, char delim);
|
|
|
|
} // namespace util
|