1.CString::IsEmpty BOOL IsEmpty( ) const; 返回值:如果CString 对象的长度为0,则返回非零值;否则返回0。 说明:此成员函数用来测试一个CString 对象是否是空的。 示例: 下面的例子说明了如何使用CString::IsEmpty。 // CString::IsEmpty 示例 CString s; ASSERT( s.IsEmpty() ); 请参阅 CString::GetLeng...
1.CString::IsEmpty BOOL IsEmpty( ) const; 返回值:如果CString 对象的长度为0,则返回非零值;否则返回0。 说明:此成员函数用来测试一个CString 对象是否是空的。 示例: 下面的例子说明了如何使用CString::IsEmpty。 // CString::IsEmpty 示例 CString s; ASSERT( s.IsEmpty() ); 请参阅 CString::GetLeng...
1.CString::IsEmpty BOOL IsEmpty( ) const; 返回值:如果CString对象的长度为0,则返回非零值;否则返回0。 说明:此成员函数用来测试一个CString对象是否是空的。 示例: 下面的例子说明了如何使用CString::IsEmpty。 // CString::IsEmpty示例 CString s; ASSERT( s.IsEmpty() ); 请参阅CString::GetLength 2...
综上所述,判断一个 CString 对象是否为空,最常用且推荐的方法是使用 GetLength() == 0 或IsEmpty() 方法。
ASSERT( s.IsEmpty() ); 请参阅 CString::GetLength CString::Left CString Left( int nCount ) const; throw( CMemoryException ); 返回的字符串是前nCount个字符。 例子 CString s( _T(“abcdef”) ); ASSERT( s.Left(2) == _T(“ab”) ); ...
This method determines whether a CString object is empty.Copy BOOL IsEmpty( ) const; Return ValueNonzero if the CString object has 0 length; otherwise, it is zero.ExampleThe following example demonstrates the use of CString::IsEmpty.// example for CString::IsEmpty CString s; ASSERT( s.Is...
// CString::IsEmpty 示例 CString s; ASSERT( s.IsEmpty() ); 请参阅 CString::GetLength 2.CString::Left CString Left( int nCount ) const; throw( CMemoryException ); 返回值:返回的字符串是前nCount个字符。 示例: CString s( _T("abcdef") ); ...
1.CString::IsEmpty BOOL IsEmpty( ) const; 返回值:如果CString对象的长度为0,则返回非零值;否则返回0。 说明:此成员函数用来测试一个CString对象是否是空的。 示例: 下面的例子说明了如何使用CString::IsEmpty。 // CString::IsEmpty 示例 CString s; ...
1.CString::IsEmpty BOOL IsEmpty( ) const; 返回值:如果CString对象的长度为0,则返回非零值;否则返回0。 说明:此成员函数用来测试一个CString对象是否是空的。 示例: 下面的例子说明了如何使用CString::IsEmpty。 // CString::IsEmpty示例 CString s; ...
CString 操作指南,CString类一、常用成员函数1.intGetLength()const;说明:获取CString类对象包含字符串的长度(字符数)。2.BOOLIsEmpty()const;说明:测试CString类对象包含的字符串是否为空。3.voidEmpty();说明:使CString类对象包含的字符串为空字符串。4.T