How to convert juce::String* to wchar_t*


#1

Hi,all
I want to convert juce::String* to wchar_t*, and is there some way to do it?

Thank
best
leon


#2

Jules replied before: WCHAR is the same as a juce wide char, so just cast it.

could you give me example, and hwo to do juce::String ----> wchar_t,
juce::String*---->wchar_t*

Thankyou!
Best


#3

[code]const String myJuceString (T(“Hello”));

const wchar_t* name = (const wchar_t*)myJuceString;[/code]

?


#4

Thank you.
It works.

Best
Leon