Function cras::removePrefix
Defined in File string_utils.hpp
Function Documentation
-
::std::string cras::removePrefix(const ::std::string &str, const ::std::string &prefix, bool *hadPrefix = nullptr)
Remove
prefixfrom start ofstrif it contains it, otherwise returnstrunchanged.- Parameters:
str – [in] The string to work on.
prefix – [in] The prefix to find.
hadPrefix – [in] If non-null, will contain information whether
strstarts withprefix.
- Returns:
If
strstarts withprefix, it will returnstrwithprefixremoved. Otherwise,strwill be returned unchanged.