System::String, std::string and const char* and newline

V

Vasco Lohrenscheit

Hello,

i can convert between the different string types (String constructor and
Marshal::StringToHGlobalAnsi), but have problems with endline '\n'.

It seems that System::String needs "\r\n" for newline, otherwise
multiple lines in Textbox fail. Is there a way to convert correct from
std::string or const char* with '\n' to System::String with "\r\n" and
back ?
Till now have to add and remove the '\r' by 'hand' when converting.
Isn't there a better way to handle this ?

Thanks,

Vasco
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top