CString city = "Philadelphia"; CString::Delete int Delete( int nIndex, int nCount = 1); 返回值是被删除前的字符串的长度 nIndex是第一个被删除的字符,nCount是一次删除几个字符。根据我实验得出的结果:当nCount>要删除字符串的最大长度(GetCount() -nIndex)时会出错,当nCount过大,没有足够的字符...
CString city = "Philadelphia"; 21.CString::Delete int Delete( int nIndex, int nCount = 1); 返回值:是被删除前的字符串的长度 nIndex是第一个被删除的字符,nCount是一次删除几个字符。根据我实验得出的结果:当nCount>要删除字符串的最大长度(GetCount() - nIndex)时会出错,当nCount过大,没有足够...
int Delete( int nIndex, int nCount = 1); 返回值:是被删除前的字符串的长度 nIndex是第一个被删除的字符,nCount是一次删除几个字符。根据我实验得出的结果:当nCount>要删除字符串的最大长度(GetCount() - nIndex)时会出错,当nCount过大,没有足够的字符删除时,此函数不执行。 示例: ...
// int i=(str1 == str2); str1.Delete(2,3); 如果nCount(3) > GetCount() – nIndex (5-2)就会执行错误 CString::Empty Void Empty( ); 没有返回值 清空操作; 例子 CString s( "abc" ); s.Empty(); ASSERT( s.GetLength( ) == 0 ); CString::Find int Find( TCHAR ch ) const; ...
CString::Delete int Delete( int nIndex, int nCount = 1); 返回值是被删除前的字符串的长度 nIndex是第一个被删除的字符,nCount是一次删除几个字符。根据我实验得出的结果:当nCount>要删除字符串的最大长度(GetCount() -nIndex)时会出错,当nCount过大,没有足够的字符删除时,此函数不执行。
21.CString::Delete int Delete( int nIndex, int nCount = 1); 返回值:是被删除前的字符串的长度 nIndex是第一个被删除的字符,nCount是一次删除几个字符。根据我实验得出的结果:当nCount>要删除字符串的最大长度(GetCount() - nIndex)时会出错,当nCount过大,没有足够的字符删除时,此函数不执行。
str1.Delete(2,3); 如果nCount(3) > GetCount() – nIndex (5-2)就会执行错误 22.CString::Empty Void Empty( ); 返回值:没有返回值 清空操作; 示例: CString s( "abc" ); s.Empty(); ASSERT( s.GetLength( ) == 0 ); 23.CString::Find ...
CString::Delete int Delete( int nIndex, int nCount = 1 ) throw( CMemoryException ); Return Value 返回值 The length of the changed string.返回改变后的字符串长度。 Parameters参数 nIndex The index of the first character to delete.表示第一个需要被删除的字符位置。
int Delete( int nIndex, int nCount = 1 )删除字符,删除从下标nIndex开始的nCount个字符例:csStr="ABCDEF"; csStr.Delete(2,3); cout<<csStr; // ABF //当nIndex过大,超出对像所在内存区域时,函数没有任何操作。//当nIndex为负数时,从第一个字符开始删除。//当nCount过大,导致删除字符超出对像...
CString s5( 'x' ); // s5 = "x" CString s6( 'x', 6 ); // s6 = "xxxxxx" CString s7((LPCSTR)ID_FILE_NEW); // s7 = "Create a new document" CString city = "Philadelphia"; 21.CString::Delete int Delete( int nIndex, int nCount = 1); 43/4<1234>《...