Main Page Modules Class Hierarchy Data Structures File List Data Fields Globals Related Pages

# OSCL_StackString< MaxBufSize > Class Template Reference
[OSCL Util]

`#include <oscl_string_containers.h>`

Inheritance diagram for OSCL_StackString< MaxBufSize >:

## Public Types
typedef OSCL_String::chartype | chartype
typedef TOSCL_StringOp | optype
typedef OSCL_wString::chartype | other_chartype
## Public Methods
| OSCL_StackString ()
| OSCL_StackString (const OSCL_StackString &src)
| OSCL_StackString (const OSCL_String &src)
| OSCL_StackString (const chartype *cstr)
| OSCL_StackString (const chartype *buf, uint32 length)
| ~OSCL_StackString ()
uint32 | get_size () const
uint32 | get_maxsize () const
const chartype * | get_cstr () const
chartype * | get_str () const
OSCL_StackString & | operator= (const OSCL_StackString &src)
OSCL_StackString & | operator= (const OSCL_String &src)
OSCL_StackString & | operator= (const chartype *cstr)
void | set (const chartype *buf, uint32 length)
void | set (const other_chartype *buf, optype op)
void | set (const other_chartype *buf, uint32 length, optype op)
## Friends
class | OSCL_String

## Detailed Description

### template<uint32 MaxBufSize>
class OSCL_StackString< MaxBufSize >

OSCL_StackString is a simple string class, compatible with regular character array strings.

The string array is fixed length, is allocated from the stack, and is modifiable. Operations that update the string will automatically truncate it to fit the fixed size storage. This is recommended for use for short strings (<255). Use OSCL_HeapString for very large strings to avoid stack overflow.

Parameters:

  C: | type of character.
  MaxBufSize: | maximum string length not including null terminator.

## Member Typedef Documentation

template<uint32 MaxBufSize>
typedef OSCL_String::chartype OSCL_StackString< MaxBufSize >::chartype

| Reimplemented from OSCL_String.

template<uint32 MaxBufSize>
typedef TOSCL_StringOp OSCL_StackString< MaxBufSize >::optype

template<uint32 MaxBufSize>
typedef OSCL_wString::chartype OSCL_StackString< MaxBufSize >::other_chartype

## Friends And Related Function Documentation

template<uint32 MaxBufSize>
friend class OSCL_String`[friend]`

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

- oscl_string_containers.h