Previous Topic: CaString& MakeEmpty( void )

Next Topic: CaString& Trim( void )


long GetLength(void) const

Returns the number of characters in this string.

Owning Class

CaString

Arguments

None

Return Value

long - string length

Notes

This function returns number characters not number of bytes. If Unicode, then each character is two bytes wide.

If string value is NULL or the empty string then return value is zero.

Example

CaString d(“My String”); long length = d.GetLength();

More information: