question

Upvotes
Accepted
3 0 0 2

How to convert EmaString to std::string

Does anyone know how to convert it?Thx

elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
7.6k 15 6 9

@jason.ng

You can just simply calls EmaString::c_str() to return buffer as const char* and then you can use string::append() to add the buffer from EmaString to std::string.

For example,

EmaString hostname="localhost:14002";
std::string host;
host.append(hostname.c_str());
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea