Template Function cras::quoteIfStringType

Function Documentation

template<typename T, ::std::enable_if_t<!::cras::is_string<::std::decay_t<T>>::value, bool> = true>
inline ::std::string cras::quoteIfStringType(const ::std::string &s, const T&)

Put s in double quotes if T is a string type (std::string or char*).

Template Parameters:

T – The type to check.

Parameters:

s[in] The input string.

Returns:

Either s in double quotes if T is a string type, or just s.