开发者

getting substring from ustring

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜