Skip to content

Commit

Permalink
CharUpperW
Browse files Browse the repository at this point in the history
  • Loading branch information
katahiromz committed Mar 6, 2024
1 parent 1a6d7df commit ec2add8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions refguid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

void show_version(void)
{
std::puts("refguid version 1.1 by katahiromz");
std::puts("refguid version 1.2 by katahiromz");
}

void usage(void)
Expand Down Expand Up @@ -387,12 +387,15 @@ BOOL doFilterByGuid(std::vector<ENTRY>& entries, const GUID& guid)
return !entries.empty();
}

BOOL doFilterByString(std::vector<ENTRY>& entries, const std::wstring& text)
BOOL doFilterByString(std::vector<ENTRY>& entries, std::wstring text)
{
::CharUpperW(&text[0]);

std::vector<ENTRY> got;
for (auto& entry : entries)
{
auto str = getDefineGUIDFromGUID(entry.guid, entry.name.c_str());
::CharUpperW(&str[0]);
if (str.find(text) != str.npos)
{
got.push_back(entry);
Expand Down

0 comments on commit ec2add8

Please sign in to comment.