# 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 (uint 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 22 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 95 of file str.hpp.

References ByteBlob::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 61 of file str.hpp.

References ByteBlob::AppendRaw(), ByteBlob::FixTail(), and ByteBlob::Length().

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

Append zero-ended C string.

Definition at line 52 of file str.hpp.

References ByteBlob::AppendRaw(), ByteBlob::FixTail(), and StrEmpty().

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

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

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

Definition at line 44 of file str.hpp.

References ByteBlob::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 78 of file str.hpp.

References ByteBlob::AppendRaw(), ByteBlob::Clear(), CBlobT< T >::Data(), ByteBlob::FixTail(), and CBlobT< T >::Size().

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

Assignment from C string.

Definition at line 70 of file str.hpp.

References AppendStr(), and ByteBlob::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