19 void Resource::Split(
const std::string &line,
const char delimeter, std::vector<std::string> &elements)
21 if (line.empty())
return;
25 std::stringstream ss(line);
28 while (std::getline(ss, element, delimeter))
30 elements.push_back(element);
36 if (line.empty())
return;
38 std::size_t position = line.find(
"//");
39 if (position == std::string::npos)
return;
41 line = line.substr(0, position);
48 if (line.empty())
return;
52 pos = line.find_first_not_of(
" \t");
53 if (pos != std::string::npos) line = line.substr(pos);
55 pos = line.find_last_not_of(
" \t");
56 if (pos != std::string::npos) line = line.substr(0, pos + 1);
void Split(const std::string &line, const char delimeter, std::vector< std::string > &elements)
Splits a string into a vector of strings.
void TrimLine(std::string &line)
Removes white-space at the front and end of a line of text.
void ParseComments(std::string &line)
Removes c-style, single-line comments from a line of text.
Katana Engine is a library of classes, interfaces, and value types that provides a foundation for dev...