# CStrT< Tchar, TcaseInsensitive > Struct Template Reference

Blob based string. More...

`#include <str.hpp>`

Inheritance diagram for CStrT< Tchar, TcaseInsensitive >:

## Public Types
typedef CBlobT< Tchar > | base
| base class
typedef CStrApiT< Tchar, TcaseInsensitive > | Api
| string API abstraction layer
typedef base::bsize_t | bsize_t
| size type inherited from blob
typedef base::OnTransfer | OnTransfer
| temporary 'transfer ownership' object type
## Public Member Functions
FORCEINLINE | CStrT (const Tchar *str=NULL)
| Construction from C zero ended string.
FORCEINLINE | CStrT (const Tchar *str, bsize_t num_chars)
| Construction from C string and given number of characters.
FORCEINLINE | CStrT (const Tchar *str, const Tchar *end)
| Construction from C string determined by 'begin' and 'end' pointers.
FORCEINLINE | CStrT (const CBlobBaseSimple &src)
| Construction from blob contents.
FORCEINLINE | CStrT (const CStrT &src)
| Copy constructor.
FORCEINLINE | CStrT (const OnTransfer &ot)
| Take over ownership constructor.
FORCEINLINE Tchar * | GrowSizeNC (bsize_t count)
| Grow the actual buffer and fix the trailing zero at the end.
FORCEINLINE void | AppendStr (const Tchar *str)
| Append zero-ended C string.
FORCEINLINE void | Append (const CBlobBaseSimple &src)
| Append another CStrT or blob.
FORCEINLINE CStrT & | operator= (const Tchar *src)
| Assignment from C string.
FORCEINLINE CStrT & | operator= (const CBlobBaseSimple &src)
| Assignment from another CStrT or blob.
FORCEINLINE CStrT & | operator= (const CStrT &src)
| Assignment from another CStrT or blob.
FORCEINLINE bool | operator< (const CStrT &other) const
| Lower-than operator (to support stl collections).
int | AddFormatL (const Tchar *format, va_list args)
| Add formated string (like vsprintf) at the end of existing contents.
int | AddFormat (const Tchar *format,...)
| Add formated string (like sprintf) at the end of existing contents.
int | FormatL (const Tchar *format, va_list args)
| Assign formated string (like vsprintf).
int | Format (const Tchar *format,...)
| Assign formated string (like sprintf).

## Detailed Description

### template<typename Tchar, bool TcaseInsensitive>
struct CStrT< Tchar, TcaseInsensitive >

Blob based string.

Definition at line 14 of file str.hpp.

## Constructor & Destructor Documentation

template<typename Tchar, bool TcaseInsensitive>

FORCEINLINE CStrT< Tchar, TcaseInsensitive >::CStrT | ( | const Tchar * | str = `NULL` | ) | `[inline]`

Construction from C zero ended string.

Definition at line 22 of file str.hpp.

template<typename Tchar, bool TcaseInsensitive>

FORCEINLINE CStrT< Tchar, TcaseInsensitive >::CStrT | ( | const Tchar * | str,
|  | bsize_t | num_chars |
| ) |  |  | `[inline]`

Construction from C string and given number of characters.

Definition at line 28 of file str.hpp.

template<typename Tchar, bool TcaseInsensitive>

FORCEINLINE CStrT< Tchar, TcaseInsensitive >::CStrT | ( | const Tchar * | str,
|  | const Tchar * | end |
| ) |  |  | `[inline]`

Construction from C string determined by 'begin' and 'end' pointers.

Definition at line 34 of file str.hpp.

template<typename Tchar, bool TcaseInsensitive>

FORCEINLINE CStrT< Tchar, TcaseInsensitive >::CStrT | ( | const CBlobBaseSimple & | src | ) | `[inline]`

Construction from blob contents.

Definition at line 41 of file str.hpp.

template<typename Tchar, bool TcaseInsensitive>

FORCEINLINE CStrT< Tchar, TcaseInsensitive >::CStrT | ( | const CStrT< Tchar, TcaseInsensitive > & | src | ) | `[inline]`

Copy constructor.

Definition at line 48 of file str.hpp.

## Member Function Documentation

template<typename Tchar, bool TcaseInsensitive>

FORCEINLINE Tchar* CStrT< Tchar, TcaseInsensitive >::GrowSizeNC | ( | bsize_t | count | ) | `[inline]`

Grow the actual buffer and fix the trailing zero at the end.

Definition at line 61 of file str.hpp.

Referenced by CStrT< char, false >::AddFormatL(), and DumpTarget::WriteIndent().

template<typename Tchar, bool TcaseInsensitive>

FORCEINLINE void CStrT< Tchar, TcaseInsensitive >::AppendStr | ( | const Tchar * | str | ) | `[inline]`

Append zero-ended C string.

Definition at line 69 of file str.hpp.

Referenced by DumpTarget::BeginStruct(), CStrT< char, false >::CStrT(), CStrT< char, false >::operator=(), and DumpTarget::WriteLine().

template<typename Tchar, bool TcaseInsensitive>

FORCEINLINE void CStrT< Tchar, TcaseInsensitive >::Append | ( | const CBlobBaseSimple & | src | ) | `[inline]`

Append another CStrT or blob.

Definition at line 78 of file str.hpp.

template<typename Tchar, bool TcaseInsensitive>

FORCEINLINE CStrT& CStrT< Tchar, TcaseInsensitive >::operator= | ( | const Tchar * | src | ) | `[inline]`

Assignment from C string.

Definition at line 87 of file str.hpp.

template<typename Tchar, bool TcaseInsensitive>

FORCEINLINE CStrT& CStrT< Tchar, TcaseInsensitive >::operator= | ( | const CBlobBaseSimple & | src | ) | `[inline]`

Assignment from another CStrT or blob.

Definition at line 95 of file str.hpp.

template<typename Tchar, bool TcaseInsensitive>

FORCEINLINE CStrT& CStrT< Tchar, TcaseInsensitive >::operator= | ( | const CStrT< Tchar, TcaseInsensitive > & | src | ) | `[inline]`

Assignment from another CStrT or blob.

Definition at line 104 of file str.hpp.

template<typename Tchar, bool TcaseInsensitive>

int CStrT< Tchar, TcaseInsensitive >::AddFormatL | ( | const Tchar * | format,
|  | va_list | args |
| ) |  |  | `[inline]`

Add formated string (like vsprintf) at the end of existing contents.

Definition at line 119 of file str.hpp.

Referenced by CStrT< char, false >::AddFormat(), CStrT< char, false >::Format(), CStrT< char, false >::FormatL(), and DumpTarget::WriteLine().

template<typename Tchar, bool TcaseInsensitive>

int CStrT< Tchar, TcaseInsensitive >::AddFormat | ( | const Tchar * | format,
|  |  | ... |
| ) |  |  | `[inline]`

Add formated string (like sprintf) at the end of existing contents.

Definition at line 155 of file str.hpp.

Referenced by DumpTarget::BeginStruct(), ComposeNameT(), DumpTarget::EndStruct(), DumpTarget::WriteTile(), and DumpTarget::WriteValue().

template<typename Tchar, bool TcaseInsensitive>

int CStrT< Tchar, TcaseInsensitive >::FormatL | ( | const Tchar * | format,
|  | va_list | args |
| ) |  |  | `[inline]`

Assign formated string (like vsprintf).

Definition at line 165 of file str.hpp.

template<typename Tchar, bool TcaseInsensitive>

int CStrT< Tchar, TcaseInsensitive >::Format | ( | const Tchar * | format,
|  |  | ... |
| ) |  |  | `[inline]`

Assign formated string (like sprintf).

Definition at line 173 of file str.hpp.

Referenced by TileStr(), and ValueStr().

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

- src/misc/str.hpp