ReactOS  0.4.15-dev-440-g5f37b68
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)
 
void __cdecl FormatMessage (UINT nFormatID,...)
 
void __cdecl FormatMessage (PCXSTR pszFormat,...)
 
void FormatMessageV (PCXSTR pszFormat, va_list *pArgList)
 
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)
 
static void ThrowMemoryException ()
 
static void ThrowInvalidArgException ()
 

Detailed Description

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

Definition at line 341 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 345 of file cstringt.h.

◆ PCXSTR

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

Definition at line 349 of file cstringt.h.

◆ PCYSTR

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

Definition at line 352 of file cstringt.h.

◆ PXSTR

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

Definition at line 348 of file cstringt.h.

◆ PYSTR

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

Definition at line 351 of file cstringt.h.

◆ StrTraits

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

Definition at line 346 of file cstringt.h.

◆ XCHAR

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

Definition at line 347 of file cstringt.h.

◆ YCHAR

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

Definition at line 350 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 355 of file cstringt.h.

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

Referenced by ATL::CStringT< BaseType, StringTraits >::Left(), ATL::CStringT< BaseType, StringTraits >::Mid(), and ATL::CStringT< BaseType, StringTraits >::Right().

◆ CStringT() [2/11]

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

Definition at line 360 of file cstringt.h.

360  :
361  CThisSimpleString(pStringMgr)
362  {
363  }
CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits > CThisSimpleString
Definition: cstringt.h:345

◆ CStringT() [3/11]

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

Definition at line 370 of file cstringt.h.

370  :
371  CThisSimpleString(strSrc)
372  {
373  }
CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits > CThisSimpleString
Definition: cstringt.h:345

◆ CStringT() [4/11]

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

Definition at line 375 of file cstringt.h.

375  :
376  CThisSimpleString(strSrc)
377  {
378  }
CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits > CThisSimpleString
Definition: cstringt.h:345

◆ 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 381 of file cstringt.h.

381  :
382  CThisSimpleString(StringTraits::GetDefaultManager())
383  {
384  *this = static_cast<const YCHAR*>(strSrc);
385  }
CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits > CThisSimpleString
Definition: cstringt.h:345

◆ CStringT() [6/11]

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

Definition at line 401 of file cstringt.h.

401  :
402  CThisSimpleString(StringTraits::GetDefaultManager())
403  {
404  LoadFromPtr_(pszSrc);
405  }
CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits > CThisSimpleString
Definition: cstringt.h:345
void LoadFromPtr_(_In_opt_z_ const T_CHAR *pszSrc)
Definition: cstringt.h:390

◆ 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 407 of file cstringt.h.

408  : CThisSimpleString(pStringMgr)
409  {
410  LoadFromPtr_(pszSrc);
411  }
CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits > CThisSimpleString
Definition: cstringt.h:345
void LoadFromPtr_(_In_opt_z_ const T_CHAR *pszSrc)
Definition: cstringt.h:390

◆ CStringT() [8/11]

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

Definition at line 413 of file cstringt.h.

413  :
414  CThisSimpleString(StringTraits::GetDefaultManager())
415  {
416  LoadFromPtr_(pszSrc);
417  }
CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits > CThisSimpleString
Definition: cstringt.h:345
void LoadFromPtr_(_In_opt_z_ const T_CHAR *pszSrc)
Definition: cstringt.h:390

◆ 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 419 of file cstringt.h.

420  : CThisSimpleString(pStringMgr)
421  {
422  LoadFromPtr_(pszSrc);
423  }
CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits > CThisSimpleString
Definition: cstringt.h:345
void LoadFromPtr_(_In_opt_z_ const T_CHAR *pszSrc)
Definition: cstringt.h:390

◆ 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 425 of file cstringt.h.

426  :
427  CThisSimpleString(pch, nLength, StringTraits::GetDefaultManager())
428  {
429  }
_In_ DWORD nLength
Definition: wincon.h:476
#define pch(ap)
Definition: match.c:418
CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits > CThisSimpleString
Definition: cstringt.h:345

◆ 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 431 of file cstringt.h.

432  :
433  CThisSimpleString(pch, nLength, StringTraits::GetDefaultManager())
434  {
435  }
_In_ DWORD nLength
Definition: wincon.h:476
#define pch(ap)
Definition: match.c:418
CSimpleStringT< BaseType, _CSTRING_IMPL_::_MFCDLLTraitsCheck< BaseType, StringTraits >::c_bIsMFCDLLTraits > CThisSimpleString
Definition: cstringt.h:345

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 630 of file cstringt.h.

Referenced by CFontCache::Filename().

◆ Construct()

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

Definition at line 365 of file cstringt.h.

366  {
367  new(pString) CStringT;
368  }

◆ DefaultTrimChars()

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

Definition at line 807 of file cstringt.h.

808  {
809  static XCHAR str[] = { ' ', '\t', '\r', '\n', 0 };
810  return str;
811  }
const WCHAR * str
CThisSimpleString::XCHAR XCHAR
Definition: cstringt.h:347

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

◆ 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 583 of file cstringt.h.

584  {
586 
587  if (iStart >= nLength || iStart < 0)
588  return -1;
589 
591  PCXSTR pszResult = StringTraits::FindString(pszString + iStart, pszSub);
592 
593  return pszResult ? ((int)(pszResult - pszString)) : -1;
594  }
_In_ DWORD nLength
Definition: wincon.h:476
_In_ UINT iStart
Definition: wingdi.h:3619
CThisSimpleString::PCXSTR PCXSTR
Definition: cstringt.h:349
static int FindString(IN FILE *pStream, IN PCWSTR pszFilePath OPTIONAL, IN PCWSTR pszSearchString)
Definition: find.c:106
_In_ DWORD _In_ DWORD _Out_writes_to_opt_ pcchString LPSTR pszString
Definition: wincrypt.h:4505
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

Referenced by CACLCustomMRU::Initialize().

◆ 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 596 of file cstringt.h.

597  {
599 
600  if (iStart >= nLength || iStart < 0)
601  return -1;
602 
604  PCXSTR pszResult = StringTraits::FindChar(pszString + iStart, ch);
605 
606  return pszResult ? ((int)(pszResult - pszString)) : -1;
607  }
_In_ DWORD nLength
Definition: wincon.h:476
_In_ UINT iStart
Definition: wingdi.h:3619
CThisSimpleString::PCXSTR PCXSTR
Definition: cstringt.h:349
_In_ DWORD _In_ DWORD _Out_writes_to_opt_ pcchString LPSTR pszString
Definition: wincrypt.h:4505
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

◆ FindOneOf()

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

Definition at line 609 of file cstringt.h.

610  {
612  PCXSTR pszResult = StringTraits::FindOneOf(pszString, pszCharSet);
613 
614  return pszResult ? ((int)(pszResult - pszString)) : -1;
615  }
CThisSimpleString::PCXSTR PCXSTR
Definition: cstringt.h:349
_In_ DWORD _In_ DWORD _Out_writes_to_opt_ pcchString LPSTR pszString
Definition: wincrypt.h:4505
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

◆ Format() [1/2]

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

◆ Format() [2/2]

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

Definition at line 698 of file cstringt.h.

699  {
700  va_list args;
701  va_start(args, pszFormat);
702  FormatV(pszFormat, args);
703  va_end(args);
704  }
void FormatV(PCXSTR pszFormat, va_list args)
Definition: cstringt.h:706
Definition: match.c:390
#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

◆ FormatMessage() [1/2]

template<typename BaseType , class StringTraits >
void __cdecl ATL::CStringT< BaseType, StringTraits >::FormatMessage ( UINT  nFormatID,
  ... 
)
inline

Definition at line 715 of file cstringt.h.

716  {
717  va_list va;
718  va_start(va, nFormatID);
719 
720  CStringT str;
721  if (str.LoadString(nFormatID))
722  FormatMessageV(str, &va);
723 
724  va_end(va);
725  }
#define va_end(ap)
Definition: acmsvcex.h:90
const WCHAR * str
char * va_list
Definition: acmsvcex.h:78
void FormatMessageV(PCXSTR pszFormat, va_list *pArgList)
Definition: cstringt.h:736
#define va_start(ap, A)
Definition: acmsvcex.h:91

◆ FormatMessage() [2/2]

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

Definition at line 727 of file cstringt.h.

728  {
729  va_list va;
730  va_start(va, pszFormat);
731  FormatMessageV(pszFormat, &va);
732  va_end(va);
733  }
#define va_end(ap)
Definition: acmsvcex.h:90
char * va_list
Definition: acmsvcex.h:78
void FormatMessageV(PCXSTR pszFormat, va_list *pArgList)
Definition: cstringt.h:736
#define va_start(ap, A)
Definition: acmsvcex.h:91

◆ FormatMessageV()

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

Definition at line 736 of file cstringt.h.

737  {
738  PXSTR psz = StringTraits::FormatMessageV(pszFormat, pArgList);
739  if (!psz)
741 
742  *this = psz;
743  ::LocalFree(psz);
744  }
CThisSimpleString::PXSTR PXSTR
Definition: cstringt.h:348
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577

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

◆ FormatV()

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

Definition at line 706 of file cstringt.h.

707  {
708  int nLength = StringTraits::FormatV(NULL, pszFormat, args);
709 
711  StringTraits::FormatV(pszBuffer, pszFormat, args);
713  }
_In_ DWORD nLength
Definition: wincon.h:476
Definition: match.c:390
smooth NULL
Definition: ftsmooth.c:416
CThisSimpleString::PXSTR PXSTR
Definition: cstringt.h:348

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

◆ GetEnvironmentVariable()

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

◆ Left()

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

Definition at line 663 of file cstringt.h.

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

◆ 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 390 of file cstringt.h.

391  {
392  if (pszSrc == NULL)
393  return;
394  if (IS_INTRESOURCE(pszSrc))
395  LoadString(LOWORD(pszSrc));
396  else
397  *this = pszSrc;
398  }
smooth NULL
Definition: ftsmooth.c:416
#define IS_INTRESOURCE(i)
Definition: winuser.h:580
BOOL LoadString(_In_ UINT nID)
Definition: cstringt.h:526
#define LOWORD(l)
Definition: pedump.c:82

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

◆ 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 531 of file cstringt.h.

533  {
534  const ATLSTRINGRESOURCEIMAGE* pImage = AtlGetStringResourceImage(hInstance, nID);
535  if (pImage == NULL) return FALSE;
536 
537  int nLength = StringTraits::GetBaseTypeLength(pImage->achString, pImage->nLength);
539  StringTraits::ConvertToBaseType(pszBuffer, nLength, pImage->achString, pImage->nLength);
541 
542  return TRUE;
543  }
#define TRUE
Definition: types.h:120
_In_ DWORD nLength
Definition: wincon.h:476
const ATLSTRINGRESOURCEIMAGE * AtlGetStringResourceImage(_In_ HINSTANCE hInstance, _In_ UINT id)
Definition: atlcore.h:273
HINSTANCE hInstance
Definition: charmap.c:20
smooth NULL
Definition: ftsmooth.c:416
CThisSimpleString::PXSTR PXSTR
Definition: cstringt.h:348

◆ 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 635 of file cstringt.h.

636  {
638 
639  if (iFirst < 0)
640  iFirst = 0;
641  if (nCount < 0)
642  nCount = 0;
643  if (iFirst > nLength)
644  iFirst = nLength;
645  if (iFirst + nCount > nLength)
646  nCount = nLength - iFirst;
647 
648  return CStringT(CThisSimpleString::GetString() + iFirst, nCount);
649  }
_In_ DWORD nLength
Definition: wincon.h:476

◆ Mid() [2/2]

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

Definition at line 651 of file cstringt.h.

652  {
654 
655  if (iFirst < 0)
656  iFirst = 0;
657  if (iFirst > nLength)
658  iFirst = nLength;
659 
660  return CStringT(CThisSimpleString::GetString() + iFirst, nLength - iFirst);
661  }
_In_ DWORD nLength
Definition: wincon.h:476

◆ operator+=() [1/3]

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

Definition at line 508 of file cstringt.h.

509  {
511  return *this;
512  }
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 514 of file cstringt.h.

515  {
517  return *this;
518  }

◆ operator+=() [3/3]

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

Definition at line 520 of file cstringt.h.

521  {
523  return *this;
524  }

◆ operator=() [1/4]

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

Definition at line 437 of file cstringt.h.

438  {
440  return *this;
441  }

◆ operator=() [2/4]

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

Definition at line 443 of file cstringt.h.

444  {
446  return *this;
447  }

◆ operator=() [3/4]

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

Definition at line 449 of file cstringt.h.

450  {
451  int length = pszSrc ? StringTraits::GetBaseTypeLength(pszSrc) : 0;
452  if (length > 0)
453  {
455  StringTraits::ConvertToBaseType(result, length, pszSrc);
457  }
458  else
459  {
461  }
462  return *this;
463  }
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
CThisSimpleString::PXSTR PXSTR
Definition: cstringt.h:348
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 465 of file cstringt.h.

466  {
468  return *this;
469  }

◆ Replace() [1/2]

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

Definition at line 746 of file cstringt.h.

747  {
749 
751  const int nOldLen = StringTraits::GetBaseTypeLength(pszOld);
752  const int nNewLen = StringTraits::GetBaseTypeLength(pszNew);
753  const int nDiff = nNewLen - nOldLen;
754  int nResultLength = nLength;
755 
756  PCXSTR pszFound;
757  while ((pszFound = StringTraits::FindString(pszString, pszOld)))
758  {
759  nResultLength += nDiff;
760  pszString = pszFound + nOldLen;
761  }
762 
764  return 0;
765 
766  PXSTR pszResult = CThisSimpleString::GetBuffer(nResultLength);
767  PXSTR pszNext;
768  int nCount = 0, nRemaining = nLength;
769  while (nRemaining && (pszNext = StringTraits::FindString(pszResult, pszOld)))
770  {
771  nRemaining -= (pszNext - pszResult);
772  nRemaining -= nOldLen;
773  if (nRemaining > 0)
774  CThisSimpleString::CopyCharsOverlapped(pszNext + nNewLen, nRemaining + 1, pszNext + nOldLen, nRemaining + 1);
775  CThisSimpleString::CopyCharsOverlapped(pszNext, nNewLen, pszNew, nNewLen);
776  pszResult = pszNext + nNewLen;
777  nCount++;
778  }
779 
781 
782  return nCount;
783  }
_In_ DWORD nLength
Definition: wincon.h:476
CThisSimpleString::PCXSTR PCXSTR
Definition: cstringt.h:349
CThisSimpleString::PXSTR PXSTR
Definition: cstringt.h:348
static int FindString(IN FILE *pStream, IN PCWSTR pszFilePath OPTIONAL, IN PCWSTR pszSearchString)
Definition: find.c:106
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:4505

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

◆ Replace() [2/2]

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

Definition at line 785 of file cstringt.h.

786  {
788  PXSTR pszFirst = StringTraits::FindChar(pszString, chOld);
789  if (!pszFirst)
790  return 0;
791 
793  int nCount = 0;
794 
796  pszFirst = pszBuffer + (pszFirst - pszString);
797  do {
798  *pszFirst = chNew;
799  ++nCount;
800  } while ((pszFirst = StringTraits::FindChar(pszFirst + 1, chOld)));
801 
803  return nCount;
804  }
_In_ DWORD nLength
Definition: wincon.h:476
CThisSimpleString::PCXSTR PCXSTR
Definition: cstringt.h:349
CThisSimpleString::PXSTR PXSTR
Definition: cstringt.h:348
_In_ DWORD _In_ DWORD _Out_writes_to_opt_ pcchString LPSTR pszString
Definition: wincrypt.h:4505

◆ ReverseFind()

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

Definition at line 617 of file cstringt.h.

618  {
620  PCXSTR pszResult = StringTraits::FindCharReverse(pszString, ch);
621 
622  return pszResult ? ((int)(pszResult - pszString)) : -1;
623  }
CThisSimpleString::PCXSTR PCXSTR
Definition: cstringt.h:349
_In_ DWORD _In_ DWORD _Out_writes_to_opt_ pcchString LPSTR pszString
Definition: wincrypt.h:4505
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

◆ Right()

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

Definition at line 675 of file cstringt.h.

676  {
678 
679  if (nCount < 0)
680  nCount = 0;
681  if (nCount > nLength)
682  nCount = nLength;
683 
684  return CStringT(CThisSimpleString::GetString() + nLength - nCount, nCount);
685  }
_In_ DWORD nLength
Definition: wincon.h:476

Referenced by CConfigParser::CacheINILocale().

◆ Trim() [1/3]

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

Definition at line 870 of file cstringt.h.

871  {
872  return Trim(DefaultTrimChars());
873  }
static PCXSTR DefaultTrimChars()
Definition: cstringt.h:807
CStringT & Trim()
Definition: cstringt.h:870

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

◆ Trim() [2/3]

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

Definition at line 875 of file cstringt.h.

876  {
877  XCHAR str[2] = { chTarget, 0 };
878  return Trim(str);
879  }
const WCHAR * str
CThisSimpleString::XCHAR XCHAR
Definition: cstringt.h:347
CStringT & Trim()
Definition: cstringt.h:870

◆ Trim() [3/3]

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

Definition at line 881 of file cstringt.h.

882  {
883  return TrimRight(pszTargets).TrimLeft(pszTargets);
884  }
CStringT & TrimLeft()
Definition: cstringt.h:814
CStringT & TrimRight()
Definition: cstringt.h:845

◆ TrimLeft() [1/3]

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

Definition at line 814 of file cstringt.h.

815  {
816  return TrimLeft(DefaultTrimChars());
817  }
CStringT & TrimLeft()
Definition: cstringt.h:814
static PCXSTR DefaultTrimChars()
Definition: cstringt.h:807

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

◆ TrimLeft() [2/3]

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

Definition at line 819 of file cstringt.h.

820  {
821  XCHAR str[2] = { chTarget, 0 };
822  return TrimLeft(str);
823  }
CStringT & TrimLeft()
Definition: cstringt.h:814
const WCHAR * str
CThisSimpleString::XCHAR XCHAR
Definition: cstringt.h:347

◆ TrimLeft() [3/3]

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

Definition at line 825 of file cstringt.h.

826  {
829  int nCount = 0;
830 
831  while (nCount < nLength && StringTraits::FindChar(pszTargets, pszBuffer[nCount]))
832  nCount++;
833 
834  if (nCount > 0)
835  {
836  CThisSimpleString::CopyCharsOverlapped(pszBuffer, nLength - nCount, pszBuffer + nCount, nLength - nCount);
837  nLength -= nCount;
838  }
840 
841  return *this;
842  }
_In_ DWORD nLength
Definition: wincon.h:476
CThisSimpleString::PXSTR PXSTR
Definition: cstringt.h:348
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 845 of file cstringt.h.

846  {
847  return TrimRight(DefaultTrimChars());
848  }
CStringT & TrimRight()
Definition: cstringt.h:845
static PCXSTR DefaultTrimChars()
Definition: cstringt.h:807

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

◆ TrimRight() [2/3]

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

Definition at line 850 of file cstringt.h.

851  {
852  XCHAR str[2] = { chTarget, 0 };
853  return TrimRight(str);
854  }
const WCHAR * str
CThisSimpleString::XCHAR XCHAR
Definition: cstringt.h:347
CStringT & TrimRight()
Definition: cstringt.h:845

◆ TrimRight() [3/3]

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

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 471 of file cstringt.h.

472  {
473  return str1.Compare(str2) == 0;
474  }

◆ operator== [2/7]

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

Definition at line 476 of file cstringt.h.

477  {
478  return str1.Compare(psz2) == 0;
479  }

◆ operator== [3/7]

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

Definition at line 481 of file cstringt.h.

482  {
483  CStringT tmp(psz2, str1.GetManager());
484  return tmp.Compare(str1) == 0;
485  }

◆ operator== [4/7]

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

Definition at line 487 of file cstringt.h.

488  {
489  return str1.GetLength() == 1 && str1[0] == ch2;
490  }

◆ operator== [5/7]

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

Definition at line 492 of file cstringt.h.

493  {
494  return str2.Compare(psz1) == 0;
495  }

◆ operator== [6/7]

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

Definition at line 497 of file cstringt.h.

498  {
499  CStringT tmp(psz1, str2.GetManager());
500  return tmp.Compare(str2) == 0;
501  }

◆ operator== [7/7]

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

Definition at line 503 of file cstringt.h.

504  {
505  return str2.GetLength() == 1 && str2[0] == ch1;
506  }

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