# CStrA Struct Reference

Blob based case sensitive ANSI/UTF-8 string. More...

`#include <str.hpp>`

Inheritance diagram for CStrA:

## Public Types

typedef CBlobT< char > | base
| base class

## Public Member Functions

FORCEINLINE | CStrA ()
| Create an empty CStrT.
FORCEINLINE | CStrA (const CStrA &src)
| Copy constructor.
FORCEINLINE | CStrA (const OnTransfer &ot)
| Take over ownership constructor.
FORCEINLINE char * | GrowSizeNC (bsize_t count)
| Grow the actual buffer and fix the trailing zero at the end.
FORCEINLINE void | AppendStr (const char *str)
| Append zero-ended C string.
FORCEINLINE void | Append (const CStrA &src)
| Append another CStrA.
FORCEINLINE CStrA & | operator= (const char *src)
| Assignment from C string.
FORCEINLINE CStrA & | operator= (const CStrA &src)
| Assignment from another CStrA.
FORCEINLINE bool | operator< (const CStrA &other) const
| Lower-than operator (to support stl collections).
int | AddFormatL (const char *format, va_list args)
| Add formated string (like vsprintf) at the end of existing contents.
int CDECL | WARN_FORMAT (2, 3) AddFormat(const char *format
| Add formated string (like sprintf) at the end of existing contents.

## Detailed Description

Blob based case sensitive ANSI/UTF-8 string.

Definition at line 21 of file str.hpp.

## Member Function Documentation

int CStrA::AddFormatL | ( | const char * | format,
|  | va_list | args |
| ) |  |  | `[inline]`

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

Definition at line 94 of file str.hpp.

References CBlobBaseSimple::FixTail(), CBlobT< char >::GetReserve(), GrowSizeNC(), and CBlobT< char >::MakeFreeSpace().

Referenced by DumpTarget::WriteLine().

FORCEINLINE void CStrA::Append | ( | const CStrA & | src | ) | `[inline]`

Append another CStrA.

Definition at line 60 of file str.hpp.

References CBlobBaseSimple::AppendRaw(), CBlobBaseSimple::FixTail(), and CBlobBaseSimple::RawSize().

FORCEINLINE void CStrA::AppendStr | ( | const char * | str | ) | `[inline]`

Append zero-ended C string.

Definition at line 51 of file str.hpp.

References CBlobT< char >::Append(), CBlobBaseSimple::FixTail(), and StrEmpty().

Referenced by DumpTarget::BeginStruct(), operator=(), and DumpTarget::WriteLine().

FORCEINLINE char* CStrA::GrowSizeNC | ( | bsize_t | count | ) | `[inline]`

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

Reimplemented from CBlobT< char >.

Definition at line 43 of file str.hpp.

References CBlobBaseSimple::FixTail(), and CBlobT< char >::GrowSizeNC().

Referenced by AddFormatL(), and DumpTarget::WriteIndent().

FORCEINLINE CStrA& CStrA::operator= | ( | const CStrA & | src | ) | `[inline]`

Assignment from another CStrA.

Definition at line 77 of file str.hpp.

References CBlobBaseSimple::AppendRaw(), CBlobBaseSimple::Clear(), and CBlobBaseSimple::FixTail().

FORCEINLINE CStrA& CStrA::operator= | ( | const char * | src | ) | `[inline]`

Assignment from C string.

Definition at line 69 of file str.hpp.

References AppendStr(), and CBlobBaseSimple::Clear().

int CDECL CStrA::WARN_FORMAT | ( | 2 | ,
|  | 3 |  |
| ) |  |  | const

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

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

- src/misc/str.hpp