c++juce

How to convert JUCE string to STD::string


Hello is there any way to convert a JUCE string to a std::string? I cannot seem to figure out how to do it in any way.

string GetGate() { return (to_string(Gate.char)); };
juce::String Gate = "A1";

Solution

  • Seems pretty simple:

    Gate.toStdString()
    

    String::toStdString