From d299ddd2f27a437f0fc0cb49abdfd6dd8e3d94f8 Mon Sep 17 00:00:00 2001 From: B Stack Date: Tue, 2 Feb 2021 11:44:31 -0500 Subject: add upstream 11.6 --- zen/string_tools.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'zen/string_tools.h') diff --git a/zen/string_tools.h b/zen/string_tools.h index 83d87244..883c45b8 100644 --- a/zen/string_tools.h +++ b/zen/string_tools.h @@ -70,12 +70,12 @@ enum class SplitOnEmpty }; template std::vector split(const S& str, const T& delimiter, SplitOnEmpty soe); -template S trimCpy(S str, bool fromLeft = true, bool fromRight = true); +template [[nodiscard]] S trimCpy(S str, bool fromLeft = true, bool fromRight = true); template void trim (S& str, bool fromLeft = true, bool fromRight = true); template void trim(S& str, bool fromLeft, bool fromRight, Function trimThisChar); -template void replace (S& str, const T& oldTerm, const U& newTerm, bool replaceAll = true); -template S replaceCpy(S str, const T& oldTerm, const U& newTerm, bool replaceAll = true); +template [[nodiscard]] S replaceCpy(S str, const T& oldTerm, const U& newTerm, bool replaceAll = true); +template void replace (S& str, const T& oldTerm, const U& newTerm, bool replaceAll = true); //high-performance conversion between numbers and strings template S numberTo(const Num& number); -- cgit