Introduce Strings::is_empty()

This commit is contained in:
Alexander Karatarakis 2017-08-28 18:54:48 -07:00
parent 7d46adb47c
commit f3d803addf
2 changed files with 6 additions and 0 deletions

View File

@ -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)
{

View File

@ -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;