Base: Add isNullOrEmpty string helper
This adds isNullOrEmpty string helper that cheks if string is... well null or empty. It is done to improve readability of the code and better express intent.
This commit is contained in:
@@ -301,6 +301,11 @@ struct BaseExport Tools
|
||||
*/
|
||||
static std::string quoted(const std::string&);
|
||||
|
||||
static constexpr bool isNullOrEmpty(const char* str)
|
||||
{
|
||||
return !str || str[0] == '\0';
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief joinList
|
||||
* Join the vector of strings \a vec using the separator \a sep
|
||||
|
||||
Reference in New Issue
Block a user