Help with compile error

I'm using an ESP32 DEV Module and the Arduino IDE.
I'm trying to get the SendKeyStrokes.ino example code from the ESP32_BLE_Keyboard library to compile.

I receive many errors, the first of which is:

c:\Users\richa\OneDrive\Documents\Arduino\libraries\ESP32_BLE_Keyboard\BleKeyboard.cpp: In member function 'void BleKeyboard::begin()':
c:\Users\richa\OneDrive\Documents\Arduino\libraries\ESP32_BLE_Keyboard\BleKeyboard.cpp:105:19: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'String'
  105 |   BLEDevice::init(deviceName);

"Cannot convert std::string to string"
I have found a note " In order to get a C-style string from an std::string, use the c_str() member function." but I don't know how to apply it in this situation.
Any help gratefully accepted.

If your board level is current i.e. >3 then this may be a ver error. Drop back to the last 2.x ver and see what happens. As far as c_string, off the top of my head it's myString.c_string
The Arduino.cc web site has the language reference docs, here is the relevant page for your c_string query. c_string
Here is info re Ver 3 changes. Ver 3

Thanks for pointing that out. I am using the latest version and see that there is an issue with std:string.
Ruis at Random Nerd Tutorials has a migration guide and has replaced std:string with String.
I will try that and see how I get on.
Thanks for your response.

Yes, the NERDS also have a migration guide. Good luck.

Tried to replace std::string with String but that caused more errors.
Tried reverting to ESP32 version 2.0.17 but again that caused issues.
I guess I'm back to solving the original issue with c_str().

Um, what do you mean? All you do is add '.c_str()' to the offending variable on line 105. Do you not know that the language reference manual is online at arduino.cc? Attached is a screen grab to show you what I meant above.

Thanks sonofy! I just couldn't figure out where to put c_str().
Onto the next one...

error: no matching function for call to 'BLECharacteristic::setValue(std::string&)'
  116 |   hid->manufacturer()->setValue(deviceManufacturer);

So the function setValue( ) has no function call that matches std::string&
Is that correct?
If so, where did the & come from?
Now it wants a pointer?

Sorry, your post makes no sense. I gave you the answer. It will take about 3 seconds to change the code.

Apologies. I'm confused and not being clear.
Your answer is quite correct. I changed the line

BLEDevice::init(deviceName);

to

BLEDevice::init(deviceName.c_str());

which resolved that specific compiler error.

There are several more errors to resolve. The next of which is

error: no matching function for call to 'BLECharacteristic::setValue(std::string&)'
  116 |   hid->manufacturer()->setValue(deviceManufacturer);

It is this error that I was referring to.

That is even simpler, there is NO such call, you have either misspelled it (use the hints feature) or somehow misunderstood.