Main Content
matlab::engine::convertUTF16StringToUTF8String
Convert UTF-16 string to UTF-8 string
Description
std::string convertUTF16StringToUTF8String(const
std::basic_string<char16_t>& utf16string)
Convert a UTF-16 string to a UTF-8 string.
Include
Namespace: | matlab::engine |
Include | MatlabEngine.hpp |
Parameters
|
A UTF-16 string |
Return Value
|
A UTF-8 string |
Exceptions
|
The function failed to allocate memory. |
|
The input type cannot be converted to
|
Examples
Convert String
Convert a matlab::engine::String
(UTF-16 string) to a
std::string
(UTF-8 string).
matlab::engine::String matlabStatement = (u"sqrt(12.7);");
std::string cmdString = convertUTF16StringToUTF8String(matlabStatement);
Version History
Introduced in R2017b