From 9dc1343bda0592f2d27bb216eb21fdec97f73945 Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Tue, 11 Jun 2019 13:39:44 +0100 Subject: Ignore whitespace only lines in brewing and furnace recipes (#4332) --- src/StringUtils.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/StringUtils.cpp') diff --git a/src/StringUtils.cpp b/src/StringUtils.cpp index ca9d4b587..ec387437d 100644 --- a/src/StringUtils.cpp +++ b/src/StringUtils.cpp @@ -1071,3 +1071,11 @@ bool StringToFloat(const AString & a_String, float & a_Num) return true; } + + + + +bool IsOnlyWhitespace(const AString & a_String) +{ + return std::all_of(a_String.cbegin(), a_String.cend(), isspace); +} -- cgit v1.2.3