You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# pragma once
class CParseString
{
public :
CParseString ( ) ;
CParseString ( CString strObject , CString strSeparator = _T ( " \t " ) ) ;
virtual ~ CParseString ( ) ;
public :
//获取分割后的字符串的个数
INT_PTR Size ( ) ;
//根据序号获取某个分割后的字符串
CString operator [ ] ( int iIndex ) ;
//重新解析
void Parse ( CString strObject , CString strSeparator = _T ( " \t " ) ) ;
protected :
//自定义的解析方式, 可以用字符串strSeparator中的字符进行分割
virtual void ParseString ( const CString & strObject , const CString & strSeparator ) ;
virtual void AddSubString ( CString & strSubString ) ;
virtual BOOL IsCharInString ( const CString & strSeparator , const TCHAR & chCur ) ;
private :
CStringArray m_strArray ;
} ;