Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Wide string to lowercase
//Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x64 #include <iostream> #include <Windows.h> static UINT AppCharToLower(UINT c) { return c - 'A' < 26u ? c | 32 : c; } int main() { wchar_t pLocale[256]; GetSystemDefaultLocaleName(pLocale, sizeof(pLocale)); std::wcout << L"Current locale: " << pLocale << std::endl; wchar_t str[] = L"José 測試 αβ"; std::wcout << L"Original string: " << str << std::endl; for(size_t i = 0; i < _countof(str); ++i) { str[i] = AppCharToLower(str[i]); } std::wcout << L"Output string: " << str << std::endl; }
run
|
edit
|
history
|
help
0
C++ quine
parameter pack workaround
VC++ error LNK2001 with combined use of non-type template parameters
karma legacy "variant" with attr_cast
-1 Girene Kadar Ortalama
what is this
vector destruction - visual studio
Permute
Matrix_1
Not an overflow