Gtk::ustring and std::getline()

Hello folks!
I am porting a 'I/O' class from 'std' to 'Gtkmm', in one section of the program I need to use std::getline, but since this function is designed to work with 'std::string', I need to catch the data in a std::string object and then pass it to a Glib::ustring object:

==== snip ====
std::string stdstr;
Glib::ustring glibstr;
std::getline( file_source, /*glibstr*/stdstr, '^' );
glibstr = stdstr;

This is a patch up job, a very bad solution, but I hope that with our help it will be a temporarily one. I don't want to use the UTF8 benefits of ustring!

What can I do?

Happiness has many doors, and when one of them closes another opens, yet we spent so much time looking at the one that is shut that we don't see the one that just opened..

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]