CSimpleStringT Class
This class represents a CSimpleStringT object.
template <typename BaseType>
class CSimpleStringT
Parameters
BaseType
The character type of the string class. Can be one of the following:char (for ANSI character strings).
wchar_t (for Unicode character strings).
TCHAR (for both ANSI and Unicode character strings).
Members
Public Typedefs
Name |
Description |
---|---|
A pointer to a constant string. |
|
A pointer to a string. |
Public Constructors
Name |
Description |
---|---|
Constructs CSimpleStringT objects in various ways. |
|
Destructor. |
Public Methods
Name |
Description |
---|---|
Appends a CSimpleStringT object to an existing CSimpleStringT object. |
|
Appends a character to an existing CSimpleStringT object. |
|
Copies a character or characters to another string. |
|
Copies a character or characters to another string in which the buffers overlap. |
|
Forces a string to have a length of zero. |
|
Frees any extra memory previously allocated by the string object. |
|
Retrieves the allocated length of a CSimpleStringT object. |
|
Returns the character at a given position. |
|
Returns a pointer to the characters in a CSimpleStringT. |
|
Returns a pointer to the characters in a CSimpleStringT, truncating to the specified length. |
|
Returns the number of characters in a CSimpleStringT object. |
|
Retrieves the memory manager of the CSimpleStringT object. |
|
Retrieves the character string |
|
Tests whether a CSimpleStringT object contains no characters. |
|
Disables reference counting and protects the string in the buffer. |
|
Allocates a specific amount of memory for the character buffer. |
|
Releases control of the buffer returned by GetBuffer. |
|
Releases control of the buffer returned by GetBuffer. |
|
Sets a character at a given position. |
|
Sets the memory manager of a CSimpleStringT object. |
|
Sets the string of a CSimpleStringT object. |
|
Returns the number of characters in the specified string. |
|
Truncates the string to a specified length. |
|
Enables reference counting and releases the string in the buffer. |
Public Operators
Name |
Description |
---|---|
Directly accesses characters stored in a CSimpleStringT object as a C-style string. |
|
Returns the character at a given position — operator substitution for GetAt. |
|
Concatenates a new string to the end of an existing string. |
|
Assigns a new value to a CSimpleStringT object. |
Remarks
CSimpleStringT is the base class for the various string classes supported by Visual C++. It provides minimal support for memory management of the string object and basic buffer manipulation. For more advanced string objects, see CStringT Class.
Requirements
Header: atlsimpstr.h