ReactOS  0.4.12-dev-36-g472787f
ATL::CStringT< BaseType, StringTraits > Class Template Reference

#include <cstringt.h>

Inheritance diagram for ATL::CStringT< BaseType, StringTraits >:
Collaboration diagram for ATL::CStringT< BaseType, StringTraits >:

Public Types

typedef CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits > CThisSimpleString
 
typedef StringTraits StrTraits
 
typedef CThisSimpleString::XCHAR XCHAR
 
typedef CThisSimpleString::PXSTR PXSTR
 
typedef CThisSimpleString::PCXSTR PCXSTR
 
typedef CThisSimpleString::YCHAR YCHAR
 
typedef CThisSimpleString::PYSTR PYSTR
 
typedef CThisSimpleString::PCYSTR PCYSTR
 
- Public Types inherited from ATL::CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits >
typedef ChTraitsBase< BaseType >::XCHAR XCHAR
 
typedef ChTraitsBase< BaseType >::PXSTR PXSTR
 
typedef ChTraitsBase< BaseType >::PCXSTR PCXSTR
 
typedef ChTraitsBase< BaseType >::YCHAR YCHAR
 
typedef ChTraitsBase< BaseType >::PYSTR PYSTR
 
typedef ChTraitsBase< BaseType >::PCYSTR PCYSTR
 

Public Member Functions

 CStringT () throw ()
 
 CStringT (_In_ IAtlStringMgr *pStringMgr) throw ()
 
 CStringT (_In_ const CStringT &strSrc)
 
 CStringT (_In_ const CThisSimpleString &strSrc)
 
template<class StringTraits_ >
 CStringT (_In_ const CStringT< YCHAR, StringTraits_ > &strSrc)
 
 CStringT (_In_opt_z_ const XCHAR *pszSrc)
 
 CStringT (_In_opt_z_ const XCHAR *pszSrc, _In_ IAtlStringMgr *pStringMgr)
 
 CStringT (_In_opt_z_ const YCHAR *pszSrc)
 
 CStringT (_In_opt_z_ const YCHAR *pszSrc, _In_ IAtlStringMgr *pStringMgr)
 
 CStringT (_In_reads_z_(nLength) const XCHAR *pch, _In_ int nLength)
 
 CStringT (_In_reads_z_(nLength) const YCHAR *pch, _In_ int nLength)
 
CStringToperator= (_In_ const CStringT &strSrc)
 
CStringToperator= (_In_opt_z_ PCXSTR pszSrc)
 
CStringToperator= (_In_opt_z_ PCYSTR pszSrc)
 
CStringToperator= (_In_ const CThisSimpleString &strSrc)
 
CStringToperator+= (_In_ const CThisSimpleString &str)
 
CStringToperator+= (_In_z_ PCXSTR pszSrc)
 
CStringToperator+= (_In_ XCHAR ch)
 
BOOL LoadString (_In_ UINT nID)
 
_Check_return_ BOOL LoadString (_In_ HINSTANCE hInstance, _In_ UINT nID)
 
BOOL GetEnvironmentVariable (_In_z_ PCXSTR pszVar)
 
CStringTMakeLower ()
 
CStringTMakeUpper ()
 
int Find (_In_ PCXSTR pszSub, _In_opt_ int iStart=0) const throw ()
 
int Find (_In_ XCHAR ch, _In_opt_ int iStart=0) const throw ()
 
int FindOneOf (_In_ PCXSTR pszCharSet) const throw ()
 
int ReverseFind (_In_ XCHAR ch) const throw ()
 
int Compare (_In_z_ PCXSTR psz) const
 
int CompareNoCase (_In_z_ PCXSTR psz) const
 
CStringT Mid (int iFirst, int nCount) const
 
CStringT Mid (int iFirst) const
 
CStringT Left (int nCount) const
 
CStringT Right (int nCount) const
 
void __cdecl Format (UINT nFormatID,...)
 
void __cdecl Format (PCXSTR pszFormat,...)
 
void FormatV (PCXSTR pszFormat, va_list args)
 
int Replace (PCXSTR pszOld, PCXSTR pszNew)
 
int Replace (XCHAR chOld, XCHAR chNew)
 
CStringTTrimLeft ()
 
CStringTTrimLeft (XCHAR chTarget)
 
CStringTTrimLeft (PCXSTR pszTargets)
 
CStringTTrimRight ()
 
CStringTTrimRight (XCHAR chTarget)
 
CStringTTrimRight (PCXSTR pszTargets)
 
CStringTTrim ()
 
CStringTTrim (XCHAR chTarget)
 
CStringTTrim (PCXSTR pszTargets)
 
BSTR AllocSysString () const
 
- Public Member Functions inherited from ATL::CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits >
 CSimpleStringT (_Inout_ IAtlStringMgr *pStringMgr)
 
 CSimpleStringT (_In_ const CSimpleStringT &strSrc)
 
 CSimpleStringT (_In_z_ PCXSTR pszSrc, _Inout_ IAtlStringMgr *pStringMgr)
 
 CSimpleStringT (_In_count_(nLength) const XCHAR *pchSrc, _In_ int nLength, _Inout_ IAtlStringMgr *pStringMgr)
 
 ~CSimpleStringT () throw ()
 
CSimpleStringToperator= (_In_opt_z_ PCXSTR pszSrc)
 
CSimpleStringToperator= (_In_ const CSimpleStringT &strSrc)
 
CSimpleStringToperator+= (_In_ const CSimpleStringT &strSrc)
 
CSimpleStringToperator+= (_In_z_ PCXSTR pszSrc)
 
CSimpleStringToperator+= (XCHAR ch)
 
 operator PCXSTR () const throw ()
 
void Empty () throw ()
 
void Append (_In_count_(nLength) PCXSTR pszSrc, _In_ int nLength)
 
void Append (_In_z_ PCXSTR pszSrc)
 
void Append (_In_ const CSimpleStringT &strSrc)
 
void SetString (_In_opt_z_ PCXSTR pszSrc)
 
void SetString (_In_reads_opt_(nLength) PCXSTR pszSrc, _In_ int nLength)
 
PXSTR GetBuffer ()
 
_Ret_notnull_ _Post_writable_size_ (nMinBufferLength+1) PXSTR GetBuffer(_In_ int nMinBufferLength)
 
int GetAllocLength () const throw ()
 
int GetLength () const throw ()
 
PCXSTR GetString () const throw ()
 
void ReleaseBufferSetLength (_In_ int nNewLength)
 
void ReleaseBuffer (_In_ int nNewLength=-1)
 
bool IsEmpty () const throw ()
 
CStringDataGetData () const throw ()
 
IAtlStringMgrGetManager () const throw ()
 

Static Public Member Functions

static void __cdecl Construct (_In_ CStringT *pString)
 
static PCXSTR DefaultTrimChars ()
 
- Static Public Member Functions inherited from ATL::CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits >
static void __cdecl CopyChars (_Out_writes_to_(nDestLen, nChars) XCHAR *pchDest, _In_ size_t nDestLen, _In_reads_opt_(nChars) const XCHAR *pchSrc, _In_ int nChars) throw ()
 
static void __cdecl CopyCharsOverlapped (_Out_writes_to_(nDestLen, nDestLen) XCHAR *pchDest, _In_ size_t nDestLen, _In_reads_(nChars) const XCHAR *pchSrc, _In_ int nChars) throw ()
 
static int __cdecl StringLength (_In_opt_z_ const char *psz) throw ()
 
static int __cdecl StringLength (_In_opt_z_ const wchar_t *psz) throw ()
 

Protected Member Functions

template<typename T_CHAR >
void LoadFromPtr_ (_In_opt_z_ const T_CHAR *pszSrc)
 

Friends

bool operator== (const CStringT &str1, const CStringT &str2) throw ()
 
bool operator== (const CStringT &str1, PCXSTR psz2) throw ()
 
bool operator== (const CStringT &str1, PCYSTR psz2) throw ()
 
bool operator== (const CStringT &str1, XCHAR ch2) throw ()
 
bool operator== (PCXSTR psz1, const CStringT &str2) throw ()
 
bool operator== (PCYSTR psz1, const CStringT &str2) throw ()
 
bool operator== (XCHAR ch1, const CStringT &str2) throw ()
 

Additional Inherited Members

- Static Protected Member Functions inherited from ATL::CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits >
static void __cdecl Concatenate (_Inout_ CSimpleStringT &strResult, _In_count_(nLength1) PCXSTR psz1, _In_ int nLength1, _In_count_(nLength2) PCXSTR psz2, _In_ int nLength2)
 

Detailed Description

template<typename BaseType, class StringTraits>
class ATL::CStringT< BaseType, StringTraits >

Definition at line 321 of file cstringt.h.

Member Typedef Documentation

◆ CThisSimpleString

template<typename BaseType , class StringTraits >
typedef CSimpleStringT<BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck<BaseType, StringTraits>::c_bIsMFCDLLTraits> ATL::CStringT< BaseType, StringTraits >::CThisSimpleString

Definition at line 325 of file cstringt.h.

◆ PCXSTR

template<typename BaseType , class StringTraits >
typedef CThisSimpleString::PCXSTR ATL::CStringT< BaseType, StringTraits >::PCXSTR

Definition at line 329 of file cstringt.h.

◆ PCYSTR

template<typename BaseType , class StringTraits >
typedef CThisSimpleString::PCYSTR ATL::CStringT< BaseType, StringTraits >::PCYSTR

Definition at line 332 of file cstringt.h.

◆ PXSTR

template<typename BaseType , class StringTraits >
typedef CThisSimpleString::PXSTR ATL::CStringT< BaseType, StringTraits >::PXSTR

Definition at line 328 of file cstringt.h.

◆ PYSTR

template<typename BaseType , class StringTraits >
typedef CThisSimpleString::PYSTR ATL::CStringT< BaseType, StringTraits >::PYSTR

Definition at line 331 of file cstringt.h.

◆ StrTraits

template<typename BaseType , class StringTraits >
typedef StringTraits ATL::CStringT< BaseType, StringTraits >::StrTraits

Definition at line 326 of file cstringt.h.

◆ XCHAR

template<typename BaseType , class StringTraits >
typedef CThisSimpleString::XCHAR ATL::CStringT< BaseType, StringTraits >::XCHAR

Definition at line 327 of file cstringt.h.

◆ YCHAR

template<typename BaseType , class StringTraits >
typedef CThisSimpleString::YCHAR ATL::CStringT< BaseType, StringTraits >::YCHAR

Definition at line 330 of file cstringt.h.

Constructor & Destructor Documentation

◆ CStringT() [1/11]

template<typename BaseType , class StringTraits >
ATL::CStringT< BaseType, StringTraits >::CStringT ( )
throw (
)
inline

Definition at line 335 of file cstringt.h.

335  :
336  CThisSimpleString(StringTraits::GetDefaultManager())
337  {
338  }
CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits > CThisSimpleString
Definition: cstringt.h:325

◆ CStringT() [2/11]

template<typename BaseType , class StringTraits >
ATL::CStringT< BaseType, StringTraits >::CStringT ( _In_ IAtlStringMgr pStringMgr)
throw (
)
inlineexplicit

Definition at line 340 of file cstringt.h.

340  :
341  CThisSimpleString(pStringMgr)
342  {
343  }
CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits > CThisSimpleString
Definition: cstringt.h:325

◆ CStringT() [3/11]

template<typename BaseType , class StringTraits >
ATL::CStringT< BaseType, StringTraits >::CStringT ( _In_ const CStringT< BaseType, StringTraits > &  strSrc)
inline

Definition at line 350 of file cstringt.h.

350  :
351  CThisSimpleString(strSrc)
352  {
353  }
CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits > CThisSimpleString
Definition: cstringt.h:325

◆ CStringT() [4/11]

template<typename BaseType , class StringTraits >
ATL::CStringT< BaseType, StringTraits >::CStringT ( _In_ const CThisSimpleString strSrc)
inline

Definition at line 355 of file cstringt.h.

355  :
356  CThisSimpleString(strSrc)
357  {
358  }
CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits > CThisSimpleString
Definition: cstringt.h:325

◆ CStringT() [5/11]

template<typename BaseType , class StringTraits >
template<class StringTraits_ >
ATL::CStringT< BaseType, StringTraits >::CStringT ( _In_ const CStringT< YCHAR, StringTraits_ > &  strSrc)
inline

Definition at line 361 of file cstringt.h.

361  :
362  CThisSimpleString(StringTraits::GetDefaultManager())
363  {
364  *this = static_cast<const YCHAR*>(strSrc);
365  }
CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits > CThisSimpleString
Definition: cstringt.h:325
CThisSimpleString::YCHAR YCHAR
Definition: cstringt.h:330

◆ CStringT() [6/11]

template<typename BaseType , class StringTraits >
ATL::CStringT< BaseType, StringTraits >::CStringT ( _In_opt_z_ const XCHAR pszSrc)
inline

Definition at line 381 of file cstringt.h.

381  :
382  CThisSimpleString(StringTraits::GetDefaultManager())
383  {
384  LoadFromPtr_(pszSrc);
385  }
CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits > CThisSimpleString
Definition: cstringt.h:325
void LoadFromPtr_(_In_opt_z_ const T_CHAR *pszSrc)
Definition: cstringt.h:370

◆ CStringT() [7/11]

template<typename BaseType , class StringTraits >
ATL::CStringT< BaseType, StringTraits >::CStringT ( _In_opt_z_ const XCHAR pszSrc,
_In_ IAtlStringMgr pStringMgr 
)
inline

Definition at line 387 of file cstringt.h.

388  : CThisSimpleString(pStringMgr)
389  {
390  LoadFromPtr_(pszSrc);
391  }
CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits > CThisSimpleString
Definition: cstringt.h:325
void LoadFromPtr_(_In_opt_z_ const T_CHAR *pszSrc)
Definition: cstringt.h:370

◆ CStringT() [8/11]

template<typename BaseType , class StringTraits >
ATL::CStringT< BaseType, StringTraits >::CStringT ( _In_opt_z_ const YCHAR pszSrc)
inline

Definition at line 393 of file cstringt.h.

393  :
394  CThisSimpleString(StringTraits::GetDefaultManager())
395  {
396  LoadFromPtr_(pszSrc);
397  }
CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits > CThisSimpleString
Definition: cstringt.h:325
void LoadFromPtr_(_In_opt_z_ const T_CHAR *pszSrc)
Definition: cstringt.h:370

◆ CStringT() [9/11]

template<typename BaseType , class StringTraits >
ATL::CStringT< BaseType, StringTraits >::CStringT ( _In_opt_z_ const YCHAR pszSrc,
_In_ IAtlStringMgr pStringMgr 
)
inline

Definition at line 399 of file cstringt.h.

400  : CThisSimpleString(pStringMgr)
401  {
402  LoadFromPtr_(pszSrc);
403  }
CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits > CThisSimpleString
Definition: cstringt.h:325
void LoadFromPtr_(_In_opt_z_ const T_CHAR *pszSrc)
Definition: cstringt.h:370

◆ CStringT() [10/11]

template<typename BaseType , class StringTraits >
ATL::CStringT< BaseType, StringTraits >::CStringT ( _In_reads_z_(nLength) const XCHAR pch,
_In_ int  nLength 
)
inline

Definition at line 405 of file cstringt.h.

406  :
407  CThisSimpleString(pch, nLength, StringTraits::GetDefaultManager())
408  {
409  }
_In_ DWORD nLength
Definition: wincon.h:461
CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits > CThisSimpleString
Definition: cstringt.h:325
WCHAR * pch
Definition: msvc.h:81

◆ CStringT() [11/11]

template<typename BaseType , class StringTraits >
ATL::CStringT< BaseType, StringTraits >::CStringT ( _In_reads_z_(nLength) const YCHAR pch,
_In_ int  nLength 
)
inline

Definition at line 411 of file cstringt.h.

412  :
413  CThisSimpleString(pch, nLength, StringTraits::GetDefaultManager())
414  {
415  }
_In_ DWORD nLength
Definition: wincon.h:461
CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits > CThisSimpleString
Definition: cstringt.h:325
WCHAR * pch
Definition: msvc.h:81

Member Function Documentation

◆ AllocSysString()

template<typename BaseType , class StringTraits >
BSTR ATL::CStringT< BaseType, StringTraits >::AllocSysString ( ) const
inline

◆ Compare()

template<typename BaseType , class StringTraits >
int ATL::CStringT< BaseType, StringTraits >::Compare ( _In_z_ PCXSTR  psz) const
inline

◆ CompareNoCase()

template<typename BaseType , class StringTraits >
int ATL::CStringT< BaseType, StringTraits >::CompareNoCase ( _In_z_ PCXSTR  psz) const
inline

Definition at line 610 of file cstringt.h.

Referenced by CAvailableApps::FindInfo().

◆ Construct()

template<typename BaseType , class StringTraits >
static void __cdecl ATL::CStringT< BaseType, StringTraits >::Construct ( _In_ CStringT< BaseType, StringTraits > *  pString)
inlinestatic

Definition at line 345 of file cstringt.h.

346  {
347  new(pString) CStringT;
348  }

◆ DefaultTrimChars()

template<typename BaseType , class StringTraits >
static PCXSTR ATL::CStringT< BaseType, StringTraits >::DefaultTrimChars ( )
inlinestatic

Definition at line 757 of file cstringt.h.

758  {
759  static XCHAR str[] = { ' ', '\t', '\r', '\n', 0 };
760  return str;
761  }
const WCHAR * str
CThisSimpleString::XCHAR XCHAR
Definition: cstringt.h:327

◆ Find() [1/2]

template<typename BaseType , class StringTraits >
int ATL::CStringT< BaseType, StringTraits >::Find ( _In_ PCXSTR  pszSub,
_In_opt_ int  iStart = 0 
) const
throw (
)
inline

Definition at line 563 of file cstringt.h.

Referenced by CACLCustomMRU::Initialize().

564  {
566 
567  if (iStart >= nLength || iStart < 0)
568  return -1;
569 
571  PCXSTR pszResult = StringTraits::FindString(pszString + iStart, pszSub);
572 
573  return pszResult ? ((int)(pszResult - pszString)) : -1;
574  }
_In_ DWORD nLength
Definition: wincon.h:461
_In_ UINT iStart
Definition: wingdi.h:3597
CThisSimpleString::PCXSTR PCXSTR
Definition: cstringt.h:329
_In_ DWORD _In_ DWORD _Out_writes_to_opt_ pcchString LPSTR pszString
Definition: wincrypt.h:4507
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:29

◆ Find() [2/2]

template<typename BaseType , class StringTraits >
int ATL::CStringT< BaseType, StringTraits >::Find ( _In_ XCHAR  ch,
_In_opt_ int  iStart = 0 
) const
throw (
)
inline

Definition at line 576 of file cstringt.h.

577  {
579 
580  if (iStart >= nLength || iStart < 0)
581  return -1;
582 
584  PCXSTR pszResult = StringTraits::FindChar(pszString + iStart, ch);
585 
586  return pszResult ? ((int)(pszResult - pszString)) : -1;
587  }
_In_ DWORD nLength
Definition: wincon.h:461
_In_ UINT iStart
Definition: wingdi.h:3597
CThisSimpleString::PCXSTR PCXSTR
Definition: cstringt.h:329
_In_ DWORD _In_ DWORD _Out_writes_to_opt_ pcchString LPSTR pszString
Definition: wincrypt.h:4507
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:29

◆ FindOneOf()

template<typename BaseType , class StringTraits >
int ATL::CStringT< BaseType, StringTraits >::FindOneOf ( _In_ PCXSTR  pszCharSet) const
throw (
)
inline

Definition at line 589 of file cstringt.h.

590  {
592  PCXSTR pszResult = StringTraits::FindOneOf(pszString, pszCharSet);
593 
594  return pszResult ? ((int)(pszResult - pszString)) : -1;
595  }
CThisSimpleString::PCXSTR PCXSTR
Definition: cstringt.h:329
_In_ DWORD _In_ DWORD _Out_writes_to_opt_ pcchString LPSTR pszString
Definition: wincrypt.h:4507
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:29

◆ Format() [1/2]

◆ Format() [2/2]

template<typename BaseType , class StringTraits >
void __cdecl ATL::CStringT< BaseType, StringTraits >::Format ( PCXSTR  pszFormat,
  ... 
)
inline

Definition at line 678 of file cstringt.h.

679  {
680  va_list args;
681  va_start(args, pszFormat);
682  FormatV(pszFormat, args);
683  va_end(args);
684  }
void FormatV(PCXSTR pszFormat, va_list args)
Definition: cstringt.h:686
#define va_end(ap)
Definition: acmsvcex.h:90
char * va_list
Definition: acmsvcex.h:78
#define va_start(ap, A)
Definition: acmsvcex.h:91
#define args
Definition: format.c:66

◆ FormatV()

template<typename BaseType , class StringTraits >
void ATL::CStringT< BaseType, StringTraits >::FormatV ( PCXSTR  pszFormat,
va_list  args 
)
inline

Definition at line 686 of file cstringt.h.

687  {
688  int nLength = StringTraits::FormatV(NULL, pszFormat, args);
689 
690  PXSTR pszBuffer = CThisSimpleString::GetBuffer(nLength);
691  StringTraits::FormatV(pszBuffer, pszFormat, args);
693  }
_In_ DWORD nLength
Definition: wincon.h:461
Definition: match.c:390
smooth NULL
Definition: ftsmooth.c:416
CThisSimpleString::PXSTR PXSTR
Definition: cstringt.h:328

◆ GetEnvironmentVariable()

template<typename BaseType , class StringTraits >
BOOL ATL::CStringT< BaseType, StringTraits >::GetEnvironmentVariable ( _In_z_ PCXSTR  pszVar)
inline

Definition at line 525 of file cstringt.h.

Referenced by CLayerUIPropPage::InitFile(), and CTrayWindow::RunFileDlgThread().

526  {
528 
529  if (nLength > 0)
530  {
531  PXSTR pszBuffer = CThisSimpleString::GetBuffer(nLength);
532  StringTraits::GetEnvironmentVariable(pszVar, pszBuffer, nLength);
534  return TRUE;
535  }
536 
538  return FALSE;
539  }
#define TRUE
Definition: types.h:120
_In_ DWORD nLength
Definition: wincon.h:461
smooth NULL
Definition: ftsmooth.c:416
CThisSimpleString::PXSTR PXSTR
Definition: cstringt.h:328
#define GetEnvironmentVariable
Definition: winbase.h:3628

◆ Left()

template<typename BaseType , class StringTraits >
CStringT ATL::CStringT< BaseType, StringTraits >::Left ( int  nCount) const
inline

Definition at line 643 of file cstringt.h.

Referenced by CACLCustomMRU::AddMRUString(), CLayerUIPropPage::InitFile(), and try_find_new_name().

644  {
646 
647  if (nCount < 0)
648  nCount = 0;
649  if (nCount > nLength)
650  nCount = nLength;
651 
652  return CStringT(CThisSimpleString::GetString(), nCount);
653  }
_In_ DWORD nLength
Definition: wincon.h:461

◆ LoadFromPtr_()

template<typename BaseType , class StringTraits >
template<typename T_CHAR >
void ATL::CStringT< BaseType, StringTraits >::LoadFromPtr_ ( _In_opt_z_ const T_CHAR pszSrc)
inlineprotected

Definition at line 370 of file cstringt.h.

371  {
372  if (pszSrc == NULL)
373  return;
374  if (IS_INTRESOURCE(pszSrc))
375  LoadString(LOWORD(pszSrc));
376  else
377  *this = pszSrc;
378  }
smooth NULL
Definition: ftsmooth.c:416
#define IS_INTRESOURCE(i)
Definition: winuser.h:580
BOOL LoadString(_In_ UINT nID)
Definition: cstringt.h:506
#define LOWORD(l)
Definition: pedump.c:82

◆ LoadString() [1/2]

template<typename BaseType , class StringTraits >
BOOL ATL::CStringT< BaseType, StringTraits >::LoadString ( _In_ UINT  nID)
inline

◆ LoadString() [2/2]

template<typename BaseType , class StringTraits >
_Check_return_ BOOL ATL::CStringT< BaseType, StringTraits >::LoadString ( _In_ HINSTANCE  hInstance,
_In_ UINT  nID 
)
inline

Definition at line 511 of file cstringt.h.

513  {
514  const ATLSTRINGRESOURCEIMAGE* pImage = AtlGetStringResourceImage(hInstance, nID);
515  if (pImage == NULL) return FALSE;
516 
517  int nLength = StringTraits::GetBaseTypeLength(pImage->achString, pImage->nLength);
518  PXSTR pszBuffer = CThisSimpleString::GetBuffer(nLength);
519  StringTraits::ConvertToBaseType(pszBuffer, nLength, pImage->achString, pImage->nLength);
521 
522  return TRUE;
523  }
#define TRUE
Definition: types.h:120
_In_ DWORD nLength
Definition: wincon.h:461
const ATLSTRINGRESOURCEIMAGE * AtlGetStringResourceImage(_In_ HINSTANCE hInstance, _In_ UINT id)
Definition: atlcore.h:268
HINSTANCE hInstance
Definition: charmap.c:20
smooth NULL
Definition: ftsmooth.c:416
CThisSimpleString::PXSTR PXSTR
Definition: cstringt.h:328

◆ MakeLower()

template<typename BaseType , class StringTraits >
CStringT& ATL::CStringT< BaseType, StringTraits >::MakeLower ( )
inline

◆ MakeUpper()

template<typename BaseType , class StringTraits >
CStringT& ATL::CStringT< BaseType, StringTraits >::MakeUpper ( )
inline

◆ Mid() [1/2]

template<typename BaseType , class StringTraits >
CStringT ATL::CStringT< BaseType, StringTraits >::Mid ( int  iFirst,
int  nCount 
) const
inline

Definition at line 615 of file cstringt.h.

616  {
618 
619  if (iFirst < 0)
620  iFirst = 0;
621  if (nCount < 0)
622  nCount = 0;
623  if (iFirst > nLength)
624  iFirst = nLength;
625  if (iFirst + nCount > nLength)
626  nCount = nLength - iFirst;
627 
628  return CStringT(CThisSimpleString::GetString() + iFirst, nCount);
629  }
_In_ DWORD nLength
Definition: wincon.h:461

◆ Mid() [2/2]

template<typename BaseType , class StringTraits >
CStringT ATL::CStringT< BaseType, StringTraits >::Mid ( int  iFirst) const
inline

Definition at line 631 of file cstringt.h.

632  {
634 
635  if (iFirst < 0)
636  iFirst = 0;
637  if (iFirst > nLength)
638  iFirst = nLength;
639 
640  return CStringT(CThisSimpleString::GetString() + iFirst, nLength - iFirst);
641  }
_In_ DWORD nLength
Definition: wincon.h:461

◆ operator+=() [1/3]

template<typename BaseType , class StringTraits >
CStringT& ATL::CStringT< BaseType, StringTraits >::operator+= ( _In_ const CThisSimpleString str)
inline

Definition at line 488 of file cstringt.h.

489  {
491  return *this;
492  }
const WCHAR * str

◆ operator+=() [2/3]

template<typename BaseType , class StringTraits >
CStringT& ATL::CStringT< BaseType, StringTraits >::operator+= ( _In_z_ PCXSTR  pszSrc)
inline

Definition at line 494 of file cstringt.h.

495  {
497  return *this;
498  }

◆ operator+=() [3/3]

template<typename BaseType , class StringTraits >
CStringT& ATL::CStringT< BaseType, StringTraits >::operator+= ( _In_ XCHAR  ch)
inline

Definition at line 500 of file cstringt.h.

501  {
503  return *this;
504  }

◆ operator=() [1/4]

template<typename BaseType , class StringTraits >
CStringT& ATL::CStringT< BaseType, StringTraits >::operator= ( _In_ const CStringT< BaseType, StringTraits > &  strSrc)
inline

Definition at line 417 of file cstringt.h.

418  {
420  return *this;
421  }

◆ operator=() [2/4]

template<typename BaseType , class StringTraits >
CStringT& ATL::CStringT< BaseType, StringTraits >::operator= ( _In_opt_z_ PCXSTR  pszSrc)
inline

Definition at line 423 of file cstringt.h.

424  {
426  return *this;
427  }

◆ operator=() [3/4]

template<typename BaseType , class StringTraits >
CStringT& ATL::CStringT< BaseType, StringTraits >::operator= ( _In_opt_z_ PCYSTR  pszSrc)
inline

Definition at line 429 of file cstringt.h.

430  {
431  int length = pszSrc ? StringTraits::GetBaseTypeLength(pszSrc) : 0;
432  if (length > 0)
433  {
435  StringTraits::ConvertToBaseType(result, length, pszSrc);
437  }
438  else
439  {
441  }
442  return *this;
443  }
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
CThisSimpleString::PXSTR PXSTR
Definition: cstringt.h:328
GLuint64EXT * result
Definition: glext.h:11304

◆ operator=() [4/4]

template<typename BaseType , class StringTraits >
CStringT& ATL::CStringT< BaseType, StringTraits >::operator= ( _In_ const CThisSimpleString strSrc)
inline

Definition at line 445 of file cstringt.h.

446  {
448  return *this;
449  }

◆ Replace() [1/2]

template<typename BaseType , class StringTraits >
int ATL::CStringT< BaseType, StringTraits >::Replace ( PCXSTR  pszOld,
PCXSTR  pszNew 
)
inline

Definition at line 696 of file cstringt.h.

Referenced by CACLCustomMRU::AddMRUString(), CDownloadManager::DownloadDlgProc(), and CZipExtract::Extract().

697  {
699 
701  const int nOldLen = StringTraits::GetBaseTypeLength(pszOld);
702  const int nNewLen = StringTraits::GetBaseTypeLength(pszNew);
703  const int nDiff = nNewLen - nOldLen;
704  int nResultLength = nLength;
705 
706  PCXSTR pszFound;
707  while ((pszFound = StringTraits::FindString(pszString, pszOld)))
708  {
709  nResultLength += nDiff;
710  pszString = pszFound + nOldLen;
711  }
712 
713  if (pszString == CThisSimpleString::GetString())
714  return 0;
715 
716  PXSTR pszResult = CThisSimpleString::GetBuffer(nResultLength);
717  PXSTR pszNext;
718  int nCount = 0, nRemaining = nLength;
719  while (nRemaining && (pszNext = StringTraits::FindString(pszResult, pszOld)))
720  {
721  nRemaining -= (pszNext - pszResult);
722  nRemaining -= nOldLen;
723  if (nRemaining > 0)
724  CThisSimpleString::CopyCharsOverlapped(pszNext + nNewLen, nRemaining + 1, pszNext + nOldLen, nRemaining + 1);
725  CThisSimpleString::CopyCharsOverlapped(pszNext, nNewLen, pszNew, nNewLen);
726  pszResult = pszNext + nNewLen;
727  nCount++;
728  }
729 
731 
732  return nCount;
733  }
_In_ DWORD nLength
Definition: wincon.h:461
CThisSimpleString::PCXSTR PCXSTR
Definition: cstringt.h:329
CThisSimpleString::PXSTR PXSTR
Definition: cstringt.h:328
static void __cdecl CopyCharsOverlapped(_Out_writes_to_(nDestLen, nDestLen) XCHAR *pchDest, _In_ size_t nDestLen, _In_reads_(nChars) const XCHAR *pchSrc, _In_ int nChars)
Definition: atlsimpstr.h:432
_In_ DWORD _In_ DWORD _Out_writes_to_opt_ pcchString LPSTR pszString
Definition: wincrypt.h:4507

◆ Replace() [2/2]

template<typename BaseType , class StringTraits >
int ATL::CStringT< BaseType, StringTraits >::Replace ( XCHAR  chOld,
XCHAR  chNew 
)
inline

Definition at line 735 of file cstringt.h.

736  {
738  PXSTR pszFirst = StringTraits::FindChar(pszString, chOld);
739  if (!pszFirst)
740  return 0;
741 
743  int nCount = 0;
744 
745  PXSTR pszBuffer = CThisSimpleString::GetBuffer(nLength);
746  pszFirst = pszBuffer + (pszFirst - pszString);
747  do {
748  *pszFirst = chNew;
749  ++nCount;
750  } while ((pszFirst = StringTraits::FindChar(pszFirst + 1, chOld)));
751 
753  return nCount;
754  }
_In_ DWORD nLength
Definition: wincon.h:461
CThisSimpleString::PCXSTR PCXSTR
Definition: cstringt.h:329
CThisSimpleString::PXSTR PXSTR
Definition: cstringt.h:328
_In_ DWORD _In_ DWORD _Out_writes_to_opt_ pcchString LPSTR pszString
Definition: wincrypt.h:4507

◆ ReverseFind()

template<typename BaseType , class StringTraits >
int ATL::CStringT< BaseType, StringTraits >::ReverseFind ( _In_ XCHAR  ch) const
throw (
)
inline

Definition at line 597 of file cstringt.h.

598  {
600  PCXSTR pszResult = StringTraits::FindCharReverse(pszString, ch);
601 
602  return pszResult ? ((int)(pszResult - pszString)) : -1;
603  }
CThisSimpleString::PCXSTR PCXSTR
Definition: cstringt.h:329
_In_ DWORD _In_ DWORD _Out_writes_to_opt_ pcchString LPSTR pszString
Definition: wincrypt.h:4507
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:29

◆ Right()

template<typename BaseType , class StringTraits >
CStringT ATL::CStringT< BaseType, StringTraits >::Right ( int  nCount) const
inline

Definition at line 655 of file cstringt.h.

Referenced by CConfigParser::CacheINILocale().

656  {
658 
659  if (nCount < 0)
660  nCount = 0;
661  if (nCount > nLength)
662  nCount = nLength;
663 
664  return CStringT(CThisSimpleString::GetString() + nLength - nCount, nCount);
665  }
_In_ DWORD nLength
Definition: wincon.h:461

◆ Trim() [1/3]

template<typename BaseType , class StringTraits >
CStringT& ATL::CStringT< BaseType, StringTraits >::Trim ( )
inline

Definition at line 820 of file cstringt.h.

821  {
822  return Trim(DefaultTrimChars());
823  }
static PCXSTR DefaultTrimChars()
Definition: cstringt.h:757
CStringT & Trim()
Definition: cstringt.h:820

◆ Trim() [2/3]

template<typename BaseType , class StringTraits >
CStringT& ATL::CStringT< BaseType, StringTraits >::Trim ( XCHAR  chTarget)
inline

Definition at line 825 of file cstringt.h.

826  {
827  XCHAR str[2] = { chTarget, 0 };
828  return Trim(str);
829  }
const WCHAR * str
CThisSimpleString::XCHAR XCHAR
Definition: cstringt.h:327
CStringT & Trim()
Definition: cstringt.h:820

◆ Trim() [3/3]

template<typename BaseType , class StringTraits >
CStringT& ATL::CStringT< BaseType, StringTraits >::Trim ( PCXSTR  pszTargets)
inline

Definition at line 831 of file cstringt.h.

832  {
833  return TrimRight(pszTargets).TrimLeft(pszTargets);
834  }
CStringT & TrimLeft()
Definition: cstringt.h:764
CStringT & TrimRight()
Definition: cstringt.h:795

◆ TrimLeft() [1/3]

template<typename BaseType , class StringTraits >
CStringT& ATL::CStringT< BaseType, StringTraits >::TrimLeft ( )
inline

Definition at line 764 of file cstringt.h.

Referenced by ATL::CStringT< BaseType, StringTraits >::Trim().

765  {
766  return TrimLeft(DefaultTrimChars());
767  }
CStringT & TrimLeft()
Definition: cstringt.h:764
static PCXSTR DefaultTrimChars()
Definition: cstringt.h:757

◆ TrimLeft() [2/3]

template<typename BaseType , class StringTraits >
CStringT& ATL::CStringT< BaseType, StringTraits >::TrimLeft ( XCHAR  chTarget)
inline

Definition at line 769 of file cstringt.h.

770  {
771  XCHAR str[2] = { chTarget, 0 };
772  return TrimLeft(str);
773  }
CStringT & TrimLeft()
Definition: cstringt.h:764
const WCHAR * str
CThisSimpleString::XCHAR XCHAR
Definition: cstringt.h:327

◆ TrimLeft() [3/3]

template<typename BaseType , class StringTraits >
CStringT& ATL::CStringT< BaseType, StringTraits >::TrimLeft ( PCXSTR  pszTargets)
inline

Definition at line 775 of file cstringt.h.

776  {
778  PXSTR pszBuffer = CThisSimpleString::GetBuffer(nLength);
779  int nCount = 0;
780 
781  while (nCount < nLength && StringTraits::FindChar(pszTargets, pszBuffer[nCount]))
782  nCount++;
783 
784  if (nCount > 0)
785  {
786  CThisSimpleString::CopyCharsOverlapped(pszBuffer, nLength - nCount, pszBuffer + nCount, nLength - nCount);
787  nLength -= nCount;
788  }
790 
791  return *this;
792  }
_In_ DWORD nLength
Definition: wincon.h:461
CThisSimpleString::PXSTR PXSTR
Definition: cstringt.h:328
static void __cdecl CopyCharsOverlapped(_Out_writes_to_(nDestLen, nDestLen) XCHAR *pchDest, _In_ size_t nDestLen, _In_reads_(nChars) const XCHAR *pchSrc, _In_ int nChars)
Definition: atlsimpstr.h:432

◆ TrimRight() [1/3]

template<typename BaseType , class StringTraits >
CStringT& ATL::CStringT< BaseType, StringTraits >::TrimRight ( )
inline

Definition at line 795 of file cstringt.h.

796  {
797  return TrimRight(DefaultTrimChars());
798  }
CStringT & TrimRight()
Definition: cstringt.h:795
static PCXSTR DefaultTrimChars()
Definition: cstringt.h:757

◆ TrimRight() [2/3]

template<typename BaseType , class StringTraits >
CStringT& ATL::CStringT< BaseType, StringTraits >::TrimRight ( XCHAR  chTarget)
inline

Definition at line 800 of file cstringt.h.

801  {
802  XCHAR str[2] = { chTarget, 0 };
803  return TrimRight(str);
804  }
const WCHAR * str
CThisSimpleString::XCHAR XCHAR
Definition: cstringt.h:327
CStringT & TrimRight()
Definition: cstringt.h:795

◆ TrimRight() [3/3]

template<typename BaseType , class StringTraits >
CStringT& ATL::CStringT< BaseType, StringTraits >::TrimRight ( PCXSTR  pszTargets)
inline

Definition at line 806 of file cstringt.h.

807  {
809  PXSTR pszBuffer = CThisSimpleString::GetBuffer(nLength);
810 
811  while (nLength > 0 && StringTraits::FindChar(pszTargets, pszBuffer[nLength-1]))
812  nLength--;
813 
815 
816  return *this;
817  }
_In_ DWORD nLength
Definition: wincon.h:461
CThisSimpleString::PXSTR PXSTR
Definition: cstringt.h:328

Friends And Related Function Documentation

◆ operator== [1/7]

template<typename BaseType , class StringTraits >
bool operator== ( const CStringT< BaseType, StringTraits > &  str1,
const CStringT< BaseType, StringTraits > &  str2 
)
throw (
)
friend

Definition at line 451 of file cstringt.h.

452  {
453  return str1.Compare(str2) == 0;
454  }

◆ operator== [2/7]

template<typename BaseType , class StringTraits >
bool operator== ( const CStringT< BaseType, StringTraits > &  str1,
PCXSTR  psz2 
)
throw (
)
friend

Definition at line 456 of file cstringt.h.

457  {
458  return str1.Compare(psz2) == 0;
459  }

◆ operator== [3/7]

template<typename BaseType , class StringTraits >
bool operator== ( const CStringT< BaseType, StringTraits > &  str1,
PCYSTR  psz2 
)
throw (
)
friend

Definition at line 461 of file cstringt.h.

462  {
463  CStringT tmp(psz2, str1.GetManager());
464  return tmp.Compare(str1) == 0;
465  }

◆ operator== [4/7]

template<typename BaseType , class StringTraits >
bool operator== ( const CStringT< BaseType, StringTraits > &  str1,
XCHAR  ch2 
)
throw (
)
friend

Definition at line 467 of file cstringt.h.

468  {
469  return str1.GetLength() == 1 && str1[0] == ch2;
470  }

◆ operator== [5/7]

template<typename BaseType , class StringTraits >
bool operator== ( PCXSTR  psz1,
const CStringT< BaseType, StringTraits > &  str2 
)
throw (
)
friend

Definition at line 472 of file cstringt.h.

473  {
474  return str2.Compare(psz1) == 0;
475  }

◆ operator== [6/7]

template<typename BaseType , class StringTraits >
bool operator== ( PCYSTR  psz1,
const CStringT< BaseType, StringTraits > &  str2 
)
throw (
)
friend

Definition at line 477 of file cstringt.h.

478  {
479  CStringT tmp(psz1, str2.GetManager());
480  return tmp.Compare(str2) == 0;
481  }

◆ operator== [7/7]

template<typename BaseType , class StringTraits >
bool operator== ( XCHAR  ch1,
const CStringT< BaseType, StringTraits > &  str2 
)
throw (
)
friend

Definition at line 483 of file cstringt.h.

484  {
485  return str2.GetLength() == 1 && str2[0] == ch1;
486  }

The documentation for this class was generated from the following file: