diff --git a/src/wcstringutil.cpp b/src/wcstringutil.cpp index d4904584d..094e661fe 100644 --- a/src/wcstringutil.cpp +++ b/src/wcstringutil.cpp @@ -46,6 +46,10 @@ wcstring truncate(const wcstring &input, int max_len, ellipsis_type etype) { return output; } +wcstring trim(const wcstring &input) { + return trim(input, whitespace.c_str()); +} + wcstring trim(const wcstring &input, const wchar_t *any_of) { auto begin_offset = input.find_first_not_of(any_of); if (begin_offset == wcstring::npos) { diff --git a/src/wcstringutil.h b/src/wcstringutil.h index 483817bff..91800cdec 100644 --- a/src/wcstringutil.h +++ b/src/wcstringutil.h @@ -64,6 +64,7 @@ enum class ellipsis_type { }; wcstring truncate(const wcstring &input, int max_len, ellipsis_type etype = ellipsis_type::Prettiest); +wcstring trim(const wcstring &input); wcstring trim(const wcstring &input, const wchar_t *any_of); #endif