How to convert EmaString to std::string

Does anyone know how to convert it?Thx

Best Answer

  • @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());