Skip to content

Commit

Permalink
Fix windows build error
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonMarechal committed Sep 15, 2023
1 parent d85e094 commit b15e62e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/cpp/xpansion_interfaces/StringManip.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ class IsNot {
using IsNotSpace = IsNot<std::ctype_base::space>;

inline std::string trim(std::string_view original) {
auto* right =
auto right =
std::find_if(original.rbegin(), original.rend(), IsNotSpace()).base();
auto* left = std::find_if(original.begin(), right, IsNotSpace());
auto left = std::find_if(original.begin(), right, IsNotSpace());
return std::string(left, right);
}

inline std::vector<std::string> split(std::string_view original,
char delimiter = ' ') {
// TODO C++20 https://en.cppreference.com/w/cpp/ranges/split_view
std::vector<std::string> strings;
auto* left = original.begin();
for (auto* it = left; it != original.end(); ++it) {
auto left = original.begin();
for (auto it = left; it != original.end(); ++it) {
if (*it == delimiter) {
strings.emplace_back(&*left, it - left);
left = it + 1;
Expand Down

0 comments on commit b15e62e

Please sign in to comment.