mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 11:43:02 +08:00
Introduce Strings::is_empty()
This commit is contained in:
parent
7d46adb47c
commit
f3d803addf
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user