8 inline vector<string>
StringSplit(
const string &source,
const char* delimiter=
" "){
9 vector<string> results;
14 while(next!=string::npos){
15 next = source.find_first_of(delimiter, prev);
16 if (next - prev != 0){
17 results.push_back(source.substr(prev, next - prev));
32 if(!(fullPath.back()==
'\\' || fullPath.back()==
'/')){
33 string tmp=path.back();
35 size_t ext_delimiter=tmp.find_last_of (
".");
36 name=tmp.substr(0,ext_delimiter);
37 if(ext_delimiter!=string::npos){
38 extension=tmp.substr(ext_delimiter+1);
44 for(
int i=0; i<path.size(); i++){
65 vector<string> new_path(path.size()+1);
67 for(
int i=0; i<path.size(); i++){
68 new_path[i+1]=path[i];
74 std::vector<std::string > path;
76 std::string extension;
void SetName(std::string s)
Definition: FileName.h:58
void PathAppend(std::string s)
Definition: FileName.h:62
std::string GetExtension()
Definition: FileName.h:56
Definition: FileName.h:26
FileName()
Definition: FileName.h:28
void PathPrepend(std::string s)
Definition: FileName.h:64
FileName(std::string fullPath)
Definition: FileName.h:29
std::string GetAsString()
Definition: FileName.h:43
std::string GetName()
Definition: FileName.h:55
void ClearPath()
Definition: FileName.h:61
void SetExtension(std::string s)
Definition: FileName.h:59
vector< string > StringSplit(const string &source, const char *delimiter=" ")
Definition: FileName.h:8