I have a ustring object sourceString wh开发者_JS百科ich is πøˆ∑´®. These string i get from an XML file while parsing it.I have used substr method to get these character string as under.
Glib::ustring uString = sourceString.substr(5,0);
But, i could get only null string, how should i a substring from it.
Not sure about how substr()
is implemented in your case, however I'd hazard that the order of your parameters is wrong! std::string::substr()
takes position first, and then size. In your case size is 0.
精彩评论