mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-07-17 19:56:38 -04:00
Implemented IniMeta helpers to fetch combination of ini files .
This commit is contained in:
parent
d1a32df54b
commit
90fa8eb408
10 changed files with 308 additions and 4 deletions
25
MissionEditor/StringHelper.h
Normal file
25
MissionEditor/StringHelper.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
#pragma once
|
||||
|
||||
#include <afx.h>
|
||||
#include <vector>
|
||||
|
||||
namespace utilities {
|
||||
static std::vector<CString> split_string(const CString& pSource, TCHAR cSplit = ',')
|
||||
{
|
||||
std::vector<CString> ret;
|
||||
CString tmp = pSource;
|
||||
int pos = 0;
|
||||
|
||||
while ((pos = tmp.Find(cSplit)) != -1) {
|
||||
ret.push_back(tmp.Left(pos));
|
||||
tmp = tmp.Mid(pos + 1);
|
||||
}
|
||||
|
||||
if (!tmp.IsEmpty()) {
|
||||
ret.push_back(tmp);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue