Convert viewIn from wchar_t to char and return a bsl::string.

Synopsis

Declared in <bdlt_formattestutil.h>

static
bsl::string
narrow(std::wstring_view const& viewIn);

Description

Convert the string referred to by the specified viewIn from wchar_t to char and return the resulting bsl::string by value. The behavior is undefined unless all of the wchar_t values in viewIn are ascii.

Return Value

narrow string by value

Parameters

Name

Description

viewIn

wide string view to convert

Created with MrDocs