diff --git a/src/Utils.h b/src/Utils.h index d306df2..0e5ba14 100644 --- a/src/Utils.h +++ b/src/Utils.h @@ -8,6 +8,8 @@ namespace HoldFast { + // Returns a view into `s`, so the caller must keep that buffer alive for as long + // as the returned view is used (do not pass a temporary std::string). [[nodiscard]] inline std::string_view TrimWhitespace(std::string_view s) { const auto first = s.find_first_not_of(" \t\r\n");