Advertisement
Guest User

Untitled

a guest
Aug 19th, 2015
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. std::vector<Glib::ustring> vLines = Glib::Regex::split_simple(";", text);
  2.     std::cout << "size: " << vLines.size() << std::endl;
  3.     if ( vLines.size() != 1 )
  4.     {
  5.       for ( int i=0; i<vLines.size(); i++)
  6.       {
  7.           Glib::ustring::size_type firstChar = vLines.at(i).find_first_not_of( " " );
  8.           Glib::ustring::size_type lastChar = vLines.at(i).find_last_not_of( " " );
  9.           std::cout << "'"<<vLines.at(i)<< "' ("<<firstChar<<","<<lastChar<<")" << std::endl;
  10.           std::cout << "'"<<vLines.at(i).substr(firstChar,lastChar)<<"'"<<std::endl;
  11.       }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement