22 #ifndef BAGEL_MFC_AFXSTR_H 23 #define BAGEL_MFC_AFXSTR_H 25 #include "bagel/mfc/minwindef.h" 26 #include "common/str.h" 39 CString(
const char *s,
int nCount) :
43 char *GetBufferSetLength(
size_t nNewLength) {
44 ensureCapacity(nNewLength + 1,
false);
45 return const_cast<char *
>(c_str());
47 void ReleaseBuffer(
int nNewLength = -1) {
48 assert(nNewLength == -1);
51 size_t GetLength()
const {
54 bool IsEmpty()
const {
61 operator const char *()
const {
65 CString &operator+=(
const char *str) {
66 Common::String::operator+=(str);
70 Common::String::operator+=(str);
74 Common::String::operator+=(c);
78 bool LoadString(
unsigned int nID);