Files
FEX-Emu--FEX/Source/Common/StringUtil.cpp
T
Lioncache ea39d80e83 StringUtil: Move algorithm header to cpp file
The header doesn't make any direct use of it.
2025-09-05 14:16:23 -04:00

19 lines
471 B
C++

// SPDX-License-Identifier: MIT
#include "Common/StringUtil.h"
#include <algorithm>
namespace FEX::StringUtil {
void ltrim(fextl::string& s) {
s.erase(s.begin(), 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