Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何检查一个std::wstring是空的还是空的?
std::wstring
wstring不是指针,它不能为空。""您可以通过与前一个直接比较或通过以下方式检查它是否为空(即,等同于):
wstring
""
str.empty(); // == (str.size() == 0)