From 800bdbb18617dfac36067b8841781a92b19d57c1 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Sun, 19 Oct 2025 00:06:54 +0200 Subject: str: Add ltrim and rtrim Useful when you only want to trim one side.. --- src/str.hh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/str.hh') diff --git a/src/str.hh b/src/str.hh index 1c618ee..c736f4b 100644 --- a/src/str.hh +++ b/src/str.hh @@ -23,6 +23,12 @@ void split(std::string_view str, std::vector& out, [[nodiscard]] std::string_view trim(std::string_view str); +[[nodiscard]] +std::string_view ltrim(std::string_view str); + +[[nodiscard]] +std::string_view rtrim(std::string_view str); + } // namespace str #endif // STR_HH -- cgit v1.2.3-70-g09d2