Introduce Strings::is_empty()
MODIFY
include/vcpkg_Strings.h
include/vcpkg_Strings.h
@@ -39,6 +39,9 @@ namespace vcpkg::Strings
static constexpr const CStringView EMPTY = "";
static constexpr const CWStringView WEMPTY = L"";
+ bool is_empty(const CStringView s);
+ bool is_empty(const CWStringView s);
+
template<class... Args>
std::string format(const char* fmtstr, const Args&... args)
{

MODIFY
src/vcpkg_Strings.cpp
src/vcpkg_Strings.cpp
@@ -71,6 +71,9 @@ namespace vcpkg::Strings::details
namespace vcpkg::Strings
{
+ bool is_empty(const CStringView s) { return s == EMPTY; }
+ bool is_empty(const CWStringView s) { return s == WEMPTY; }
+
std::wstring to_utf16(const CStringView s)
{
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>, wchar_t> conversion;

Introduce Strings::is_empty()