mirror of
https://github.com/libAthena/athena.git
synced 2025-12-10 22:17:49 +00:00
* Start to fill in save related classes
* Fix silly bug in WiiSave * Fix typos in Utilitiy.*
This commit is contained in:
@@ -374,5 +374,22 @@ atUint64 fileSize(FILE* f)
|
||||
return size;
|
||||
}
|
||||
|
||||
std::string& ltrim(std::string& s)
|
||||
{
|
||||
s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));
|
||||
return s;
|
||||
}
|
||||
|
||||
std::string& rtrim(std::string& s)
|
||||
{
|
||||
s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<int, int>(std::isspace))).base(), s.end());
|
||||
return s;
|
||||
}
|
||||
|
||||
std::string& trim(std::string& s)
|
||||
{
|
||||
return ltrim(rtrim(s));
|
||||
}
|
||||
|
||||
} // utility
|
||||
} // Athena
|
||||
|
||||
Reference in New Issue
Block a user