cast from float to int is real shit
[ozulis.git] / src / core / string.cc
blob33ab96efbfd97d83bf560c9e91af86f4dba6b57d
1 #include "string.hh"
3 namespace core
5 void replace_extention(std::string & filename, const std::string & extention)
7 size_t slash = filename.rfind('/');
8 size_t dot = filename.rfind('.');
10 /// @todo windows compatibility with '\'
11 if (dot > slash + 1)
12 filename.erase(dot + !extention.empty());
13 filename.append(extention);