Introduce new helpers
This commit is contained in:
@@ -127,6 +127,13 @@ namespace OpenVulkano
|
||||
return str.size() >= suffix.size() && 0 == str.compare(str.size()-suffix.size(), suffix.size(), suffix);
|
||||
}
|
||||
|
||||
static std::pair<std::string, std::string> SplitAtLastOccurrence(const std::string& str, char splitAt)
|
||||
{
|
||||
size_t pos = str.rfind(splitAt);
|
||||
if (pos == std::string::npos) return {str, ""};
|
||||
else return {str.substr(0, pos), str.substr(pos + 1)};
|
||||
}
|
||||
|
||||
static Array<char> ReadFile(const std::string& filePath);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user