formatter: support formatting bindings, for example in a let (#2883)

This commit is contained in:
Tyler Wilding
2023-08-05 13:23:09 -06:00
committed by GitHub
parent bb8b39a5e8
commit a7cf66fda6
17 changed files with 427 additions and 134 deletions
-2
View File
@@ -46,8 +46,6 @@ std::string ltrim(const std::string& s) {
return (start == std::string::npos) ? "" : s.substr(start);
}
// TODO - used a lot in formatting, and its slow because i bet it iterates from the start and not
// the end
std::string rtrim(const std::string& s) {
size_t end = s.find_last_not_of(WHITESPACE);
return (end == std::string::npos) ? "" : s.substr(0, end + 1);