mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-22 20:57:52 -05:00
begin working on SndBank loading from raw
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
#include "StringUtils.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
|
||||
namespace utils
|
||||
{
|
||||
@ -100,4 +101,18 @@ namespace utils
|
||||
for (auto& c : str)
|
||||
c = static_cast<char>(toupper(static_cast<unsigned char>(c)));
|
||||
}
|
||||
|
||||
std::vector<std::string> StringSplit(const std::string& str, const char delim)
|
||||
{
|
||||
std::vector<std::string> strings{};
|
||||
std::istringstream stream(str);
|
||||
|
||||
std::string s;
|
||||
while (std::getline(stream, s, delim))
|
||||
{
|
||||
strings.push_back(s);
|
||||
}
|
||||
|
||||
return strings;
|
||||
}
|
||||
} // namespace utils
|
||||
|
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace utils
|
||||
{
|
||||
@ -14,4 +15,6 @@ namespace utils
|
||||
|
||||
void MakeStringLowerCase(std::string& str);
|
||||
void MakeStringUpperCase(std::string& str);
|
||||
|
||||
std::vector<std::string> StringSplit(const std::string& str, const char delim);
|
||||
} // namespace utils
|
||||
|
Reference in New Issue
Block a user