summaryrefslogtreecommitdiff
path: root/src/utils/stringutils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/stringutils.h')
-rw-r--r--src/utils/stringutils.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/utils/stringutils.h b/src/utils/stringutils.h
index abcbc6b07..cb4bbb332 100644
--- a/src/utils/stringutils.h
+++ b/src/utils/stringutils.h
@@ -136,7 +136,14 @@ int compareStrI(const std::string &a, const std::string &b) A_WARN_UNUSED;
/**
* Tells wether the character is a word separator.
*/
-bool isWordSeparator(const signed char chr) A_CONST A_WARN_UNUSED;
+constexpr bool isWordSeparator(const signed char chr) A_CONST A_WARN_UNUSED;
+constexpr bool isWordSeparator(const signed char chr)
+{
+ return chr == ' ' ||
+ chr == ',' ||
+ chr == '.' ||
+ chr == '"';
+}
size_t findI(std::string str, std::string subStr) A_WARN_UNUSED;