void h_get_wide_user_string()

in helpers.c [75:94]


void h_get_wide_user_string(const wchar_t* message, wchar_t* input, size_t size)
{
    assert(message);
    assert(input);
    assert(size);

    while (true)
    {
        wprintf(L"%ls", message);

        if (!wscanf_s(L" %[^\n]", input, size))
        {
            wprintf(L"Failed to read string, try again.\n");

            while (getchar() != L'\n');
        }
        else
            break;
    }
}