| 发表于:2007-07-27 15:14:411楼 得分:5 |
bool cstaticex::getnextchar( cstring text, cstring& str ) { if ( m_textpos > = text.getlength() ) { m_textpos = 0; return false; } #ifdef unicode str = text.mid(m_textpos, sizeof(tchar)); #else tchar c = text[m_textpos]; if( (c & 0x80) == 0x80 ) str = text.mid(m_textpos, 2); else str = c; #endif m_textpos += str.getlength(); return true; } 给一个自己写的 | | |
|