Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- std::vector<Glib::ustring> vLines = Glib::Regex::split_simple(";", text);
- std::cout << "size: " << vLines.size() << std::endl;
- if ( vLines.size() != 1 )
- {
- for ( int i=0; i<vLines.size(); i++)
- {
- Glib::ustring::size_type firstChar = vLines.at(i).find_first_not_of( " " );
- Glib::ustring::size_type lastChar = vLines.at(i).find_last_not_of( " " );
- std::cout << "'"<<vLines.at(i)<< "' ("<<firstChar<<","<<lastChar<<")" << std::endl;
- std::cout << "'"<<vLines.at(i).substr(firstChar,lastChar)<<"'"<<std::endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement