Function cras::prependIfNonEmpty
Defined in File string_utils.hpp
Function Documentation
-
::std::string cras::prependIfNonEmpty(const ::std::string &str, const ::std::string &prefix)
If
stris nonempty, returns prefix + str, otherwise empty string.- Parameters:
str – [in] The main string.
prefix – [in] The string’s prefix.
- Returns:
The possibly prefixed string.