[ Web Proxy ]
URL:
Viewing: https://ru.cppreference.com/cpp/string/wide/wcscmp [Back]  [Original]

std::wcscmp cppreference.com
cppreference.com

std::wcscmp

cppreference.com
<tbody> </tbody>
int wcscmp( const wchar_t* lhs, const wchar_t* rhs );

.

, .

, lhs rhs .

lhs, rhs

, lhs rhs .

, lhs rhs .

, lhs rhs .

, std::wcscoll, , .

#include <algorithm>
#include <cwchar>
#include <iostream>
#include <vector>

int main()
{
    std::vector<const wchar_t*> leaders{L"", L"", L"",
        L"", L"", L"", L"", L""};

    std::ranges::sort(leaders, [](auto leaderLHS, auto leaderRHS)
    {
        return std::wcscmp(leaderLHS, leaderRHS) < 0;
    });

    std::setlocale(LC_ALL, "en_US.utf8");
    std::wcout.imbue(std::locale("en_US.utf8"));
    for (auto leader : leaders)
        std::wcout << leader << '\n';
}

:










() []

() []

() []

() []
C wcscmp

Web Proxy Viewer  |  New URL  |  Original Page