当前位置首页 > 百科> 正文

GetLength

2020-01-07 20:21:02 百科
GetLength

GetLength

CFile::GetLength
virtual DWORD GetLength( ) const;
throw( CFileException );
Return Value
该档案的长度。
Remarks
获得当前位元组档案的逻辑长度,而不是数量。
Example
The following example demonstrates the use of CString::GetLength.
// example for CString::GetLengthCString s( "abcdef" );ASSERT( s.GetLength() == 6 );CString::GetLength
int GetLength( ) const;
返回值:返回字元串中的位元组计数。
说明:
此成员函式用来获取这个CString对象中的位元组计数。这个计数不包括结尾的空字元。
对于多位元组字元集(MBCS),GetLength按每一个8位字元计数;即,在一个多位元组字元中的开始和结尾位元组被算作两个位元组。
示例:下面的例子说明了如何使用CString::GetLength。
// CString::GetLength示例:
CString s( "abcdef" );
ASSERT( s.GetLength() == 6 );
声明:此文信息来源于网络,登载此文只为提供信息参考,并不用于任何商业目的。如有侵权,请及时联系我们:baisebaisebaise@yeah.net