user49802: I'm working on BLE project with espressif library. And It returns me founded BLE device. 
std::string getManufacturerData();
std::string getName();
int         getRSSI();
BLEScan*    getScan();

When I want to print device name to serial port 
BLEAdvertisedDevice founded_dev;
founded_dev=foundDevices.getDevice(0);
Serial.println("Name -> " + founded_dev.getName());

It gives me error like this
no matching function for call to 'HardwareSerial::println(std::__cxx11::basic_string<char>)'

So how can i convert to std:string to String in Arduino?

user4143: Don't. Instead just access the underlying C string:
Serial.print(F("Name -> "));
Serial.println(founded_dev.getName().c_str());


49802: <p>I'm working on BLE project with espressif library. And It returns me founded BLE device. </p>

<pre><code>std::string getManufacturerData();
std::string getName();
int         getRSSI();
BLEScan*    getScan();
</code></pre>

<p>When I want to print device name to serial port </p>

<pre><code>BLEAdvertisedDevice founded_dev;
founded_dev=foundDevices.getDevice(0);
Serial.println("Name -&gt; " + founded_dev.getName());
</code></pre>

<p>It gives me error like this</p>

<pre><code>no matching function for call to 'HardwareSerial::println(std::__cxx11::basic_string&lt;char&gt;)'
</code></pre>

<p>So how can i convert to std:string to String in Arduino?</p>
 4143: <p>Don't. Instead just access the underlying C string:</p>

<pre><code>Serial.print(F("Name -&gt; "));
Serial.println(founded_dev.getName().c_str());
</code></pre>
