mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
[PowerRename] Introduce advanced counter functionality (#27895)
This commit is contained in:
@@ -54,3 +54,12 @@ inline void replace_chars(std::basic_string<CharT>& s,
|
||||
std::replace(begin(s), end(s), c, replacement_char);
|
||||
}
|
||||
}
|
||||
|
||||
inline std::string unwide(const std::wstring& wide)
|
||||
{
|
||||
std::string result(wide.length(), 0);
|
||||
std::transform(begin(wide), end(wide), result.begin(), [](const wchar_t c) {
|
||||
return static_cast<char>(c);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user