mirror of
https://github.com/FEX-Emu/FEX.git
synced 2024-12-15 01:49:00 +00:00
2b4ec88dae
This follows discussions from #3413. Followup commits add clang-format file, script and blame ignore lists.
17 lines
438 B
C++
17 lines
438 B
C++
// SPDX-License-Identifier: MIT
|
|
#include "Common/StringUtil.h"
|
|
|
|
namespace FEX::StringUtil {
|
|
void ltrim(fextl::string& s) {
|
|
s.erase(std::find_if(s.begin(), s.end(), [](int ch) { return !std::isspace(ch); }));
|
|
}
|
|
|
|
void rtrim(fextl::string& s) {
|
|
s.erase(std::find_if(s.rbegin(), s.rend(), [](int ch) { return !std::isspace(ch); }).base(), s.end());
|
|
}
|
|
void trim(fextl::string& s) {
|
|
ltrim(s);
|
|
rtrim(s);
|
|
}
|
|
} // namespace FEX::StringUtil
|