+ MathArray ar;
+ const_iterator it = begin();
+ while (it != end()) {
+ if (it->nucleus() && it->nucleus()->asCharInset()) {
+ string s = charSequence(it, end());
+ MathTextCodes c = it->nucleus()->asCharInset()->code();
+ ar.push_back(MathAtom(new MathStringInset(s, c)));
+ it += s.size();
+ } else {
+ ar.push_back(*it);
+ ++it;
+ }
+ }
+ return ar;