Skip to content

Commit 9dd35ef

Browse files
committed
SimpCfg:Update TrimOverSmart use templated TrimDumb after wstrconv
1 parent dea84a5 commit 9dd35ef

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

common/simpcfg.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,9 @@ std::string str_trim_oversmart(std::string sIn, const std::string &trimChars=" \
144144
mbs_to_wcs(wIn, sIn);
145145
std::wstring wTrimChars;
146146
mbs_to_wcs(wTrimChars, trimChars);
147-
wIn.erase(wIn.find_last_not_of(wTrimChars)+1);
148-
wIn.erase(0, wIn.find_first_not_of(wTrimChars));
147+
auto wOut = str_trim_dumb(wIn, wTrimChars);
149148
std::string sOut;
150-
wcs_to_mbs(sOut, wIn);
149+
wcs_to_mbs(sOut, wOut);
151150
return sOut;
152151
}
153152

0 commit comments

Comments
 (0)