From d030a26f3cfad21bee2d1d606f5d5510ac78ef6a Mon Sep 17 00:00:00 2001 From: HanishKVC Date: Sat, 4 May 2024 00:51:52 +0530 Subject: [PATCH] SimpCfg:Update TrimOverSmart use templated TrimDumb after wstrconv --- common/simpcfg.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common/simpcfg.hpp b/common/simpcfg.hpp index 686c8de51..02404d634 100644 --- a/common/simpcfg.hpp +++ b/common/simpcfg.hpp @@ -144,10 +144,9 @@ std::string str_trim_oversmart(std::string sIn, const std::string &trimChars=" \ mbs_to_wcs(wIn, sIn); std::wstring wTrimChars; mbs_to_wcs(wTrimChars, trimChars); - wIn.erase(wIn.find_last_not_of(wTrimChars)+1); - wIn.erase(0, wIn.find_first_not_of(wTrimChars)); + auto wOut = str_trim_dumb(wIn, wTrimChars); std::string sOut; - wcs_to_mbs(sOut, wIn); + wcs_to_mbs(sOut, wOut); return sOut; }