Function cras::removeSuffix
Defined in File string_utils.hpp
Function Documentation
-
::std::string cras::removeSuffix(const ::std::string &str, const ::std::string &suffix, bool *hadSuffix = nullptr)
Remove
suffixfrom end ofstrif it contains it, otherwise returnstrunchanged.- Parameters:
str – [in] The string to work on.
suffix – [in] The suffix to find.
hadSuffix – [in] If non-null, will contain information whether
strends withsuffix.
- Returns:
If
strends withsuffix, it will returnstrwithsuffixremoved. Otherwise,strwill be returned unchanged.