32 template<
typename ... Rest>
inline bool stringEndsWith(std::string checkedString)
37 template<
typename ... Rest>
inline bool stringEndsWith(std::string checkedString, std::string nextString, Rest ... restStrings)
39 if(checkedString.length() >= nextString.length())
40 if(0 == checkedString.compare (checkedString.length() - nextString.length(), nextString.length(), nextString))
45 template<
typename ... Rest>
inline bool stringIs(std::string checkedString)
50 template<
typename ... Rest>
inline bool stringIs(std::string checkedString, std::string nextString, Rest ... restStrings)
52 if(checkedString == nextString)
54 return stringIs(checkedString, restStrings...);
57 template<
typename ... Rest>
inline bool stringContains(std::string checkedString)
62 template<
typename ... Rest>
inline bool stringContains(std::string checkedString, std::string nextString, Rest ... restStrings)
64 if(std::string::npos != checkedString.rfind(nextString))
74 template<
typename ... Rest>
inline bool stringBeginsWith(std::string checkedString, std::string nextString, Rest ... restStrings)
76 if(0 == checkedString.rfind(nextString, 0))
81 template<
typename ... Rest>
inline bool stringWordIs(std::string checkedString)
86 template<
typename ... Rest>
inline bool stringWordIs(std::string checkedString, std::string nextString, Rest ... restStrings)
88 if(checkedString == nextString)
93 template<
typename ... Rest>
inline bool firstStringWordIs(std::string checkedString, std::string nextString, Rest ... restStrings)
95 std::stringstream ss(checkedString);
96 std::string firstWord;
98 return stringWordIs(firstWord, nextString, restStrings...);
101 template<
typename ... Rest>
inline bool charIs(
char checkedChar)
106 template<
typename ... Rest>
inline bool charIs(
char checkedChar,
char nextChar, Rest ... restChars)
108 if(checkedChar == nextChar)
110 return charIs(checkedChar, restChars...);
bool charIs(char checkedChar)
Returns false. End of recursion for template.
bool stringBeginsWith(std::string checkedString)
Returns false. End of recursion for template.
bool stringIs(std::string checkedString)
Returns false. End of recursion for template.
bool stringEndsWith(std::string checkedString)
Returns false. End of recursion for template.
bool firstStringWordIs(std::string checkedString, std::string nextString, Rest ... restStrings)
Returns true if string checkedString's first word matches fully any of strings nextString or restStri...
bool stringContains(std::string checkedString)
Returns false. End of recursion for template.
bool stringWordIs(std::string checkedString)
Returns false. End of recursion for template.