Tools: Made more updates to the MeshExtractor

This commit is contained in:
Subv committed 2012-09-28 07:59:22 -05:00
1 parent 50f833a008
commit ad0cd9f40a
7 files changed
+186 -15

No files matched your search

+11
View File
@@ -161,3 +161,14 @@ float Utils::Distance( float x, float y )
{
return sqrt(x*x + y*y);
}
std::string Utils::Replace( std::string str, const std::string& oldStr, const std::string& newStr )
{
size_t pos = 0;
while((pos = str.find(oldStr, pos)) != std::string::npos)
{
str.replace(pos, oldStr.length(), newStr);
pos += newStr.length();
}
return str;
}