Properly parse spaces and escaped/quoted spaces in expansion braces

This commit is contained in:
Mahmoud Al-Qudsi
2018-03-11 19:51:54 -05:00
parent 00f95a978e
commit 1629d339de
3 changed files with 14 additions and 14 deletions

View File

@@ -47,13 +47,6 @@ wcstring truncate(const wcstring &input, int max_len, ellipsis_type etype) {
}
wcstring trim(const wcstring &input) {
debug(0, "trimming '%ls'", input.c_str());
// auto begin = input.cbegin();
// for (begin; *begin == L' '; ++begin);
// auto end = input.cbegin() + input.size();
// for (end; end > begin && *end == L' '; ++end);
auto begin_offset = input.find_first_not_of(whitespace);
if (begin_offset == wcstring::npos) {
return wcstring{};