+inline bool hasPrefix(const std::string& prefix, const std::string& path)
+{
+ return std::mismatch(prefix.begin(), prefix.end(), path.begin()).first == prefix.end();
+}
+
+inline std::string ConvertToAssetsInternalPath(const std::string& path, int offset)
+{
+ std::string internalPath = std::string(path.c_str() + offset);
+
+ int i = 0;
+ while ((i = internalPath.find("//", i)) != std::string::npos)
+ {
+ internalPath.replace(i, 2, "/");
+ }
+
+ return internalPath;
+}
+