Skip to content

Commit

Permalink
upgrade trim spaces option
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Dec 8, 2024
1 parent 2ca0f5a commit ba9a89e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/hooks/LevelSearchLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ class BI_DLL $modify(BILevelSearchLayer, LevelSearchLayer) {
bool isID = !str.empty() && it == str.end();

if(Mod::get()->getSavedValue<bool>("search_trim")) {
str.erase(0, str.find_first_not_of(' '));
str.erase(str.find_last_not_of(' ') + 1);
for(char c : {'\n', '\t', '\r', ' '}) {
str.erase(0, str.find_first_not_of(c));
str.erase(str.find_last_not_of(c) + 1);
}
}

//if(Mod::get()->getSavedValue<bool>("search_no_id") && isID && type == SearchType::Search) str = str + "%25";
Expand Down

0 comments on commit ba9a89e

Please sign in to comment.