FEX/Source/Common/StringUtil.cpp
Paulo Matos 2b4ec88dae Whole-tree reformat
This follows discussions from #3413.
Followup commits add clang-format file, script and blame ignore lists.
2024-04-12 16:26:02 +02:00

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