Share via


CComBSTR::Length

Returns the number of characters in m_str, excluding the terminating null character.

unsigned int Length( ) const throw( );

Return Value

The length of the m_str member.

Example

// string with 11 chars
CComBSTR bstrTemp(OLESTR("Hello World"));

unsigned int len = bstrTemp.Length();

ATLASSERT(len == 11);

Requirements

Header: atlbase.h

See Also

Reference

CComBSTR Class

Other Resources

CComBSTR Members