Catos Engine (Source) 0.0.1
Lightweight Game engine
Loading...
Searching...
No Matches
catos::string Class Reference

Custom string class that functions as dynamic C_str. More...

#include <string.h>

Public Member Functions

 string ()
 Initializes the internal buff to nullptr and size to 0.
 
 string (const char *buffer)
 Copies the char array to the internal buffer.
 
 string (const string &obj)
 Copies string object to its internal values.
 
 string (string &&obj)
 Transfers ownerShip of buffers to this.
 
stringoperator= (const string &obj)
 Same as the string(const string& obj) constructor.
 
stringoperator= (string &&obj)
 Transfers ownership from a buffer to this.
 
string operator+ (const string &obj)
 Adds a string to itself.
 
unsigned int length ()
 Returns the size of the internal buffer.
 
const char * c_str () const
 Returns the internal buffer;.
 
 ~string ()
 Deletes the allocated char array.
 

Detailed Description

Custom string class that functions as dynamic C_str.

Constructor & Destructor Documentation

◆ string() [1/4]

catos::string::string ( )
inline

Initializes the internal buff to nullptr and size to 0.

◆ string() [2/4]

catos::string::string ( const char * buffer)

Copies the char array to the internal buffer.

◆ string() [3/4]

catos::string::string ( const string & obj)

Copies string object to its internal values.

◆ string() [4/4]

catos::string::string ( catos::string && obj)

Transfers ownerShip of buffers to this.

◆ ~string()

catos::string::~string ( )

Deletes the allocated char array.

Member Function Documentation

◆ c_str()

const char * catos::string::c_str ( ) const
inline

Returns the internal buffer;.

◆ length()

unsigned int catos::string::length ( )
inline

Returns the size of the internal buffer.

◆ operator+()

catos::string catos::string::operator+ ( const string & obj)

Adds a string to itself.

◆ operator=() [1/2]

catos::string & catos::string::operator= ( const string & obj)

Same as the string(const string& obj) constructor.

◆ operator=() [2/2]

catos::string & catos::string::operator= ( catos::string && obj)

Transfers ownership from a buffer to this.


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