From 68bf0fe385340b84b51fc27930b57bede1325461 Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Wed, 5 Jun 2019 13:04:21 -0500 Subject: [PATCH] Use helper function. --- bml.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bml.cpp b/bml.cpp index df2531e0..05aa88c8 100644 --- a/bml.cpp +++ b/bml.cpp @@ -47,7 +47,7 @@ static std::string trim(std::string str) for (start = 0; str[start] && start != (int)str.length() && isblank(str[start]); start++) {} if (start >= (int)str.length()) return std::string(""); - for (end = str.length() - 1; isblank(str[end]) || str[end] == '\n' || str[end] == '\r'; end--) {} + for (end = str.length() - 1; isblankorlf(str[end]); end--) {} return str.substr(start, end - start + 1); }