Kochol Game Engine  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
kge::core::String Class Reference

#include <String.h>

Inheritance diagram for kge::core::String:
kge::KgeUnknown

Public Member Functions

 String ()
 Constructor.
 String (const char *str)
 Constructor.
 ~String ()
 Destructor.
void operator= (const char *str)
 operator = with char*
void operator= (const String &str)
 copy operator
void operator+= (const char *str)
 Append a char* to string.
void operator+= (const String &str)
 Append another string.
void operator+= (int i)
 Add an integer to string.
void operator+= (float f)
 Add a float to string.
bool operator== (const char *str)
 Check with char*.
bool operator== (String &str)
 Check with kge::core::String.
char operator[] (int index)
 Get the char from string at specific position.
int Find (const char *str, unsigned int StartIndex=0)
 Find other string inside this string.
void Append (char c)
 Adds a character at the end of the string.
int Find (const String *str, unsigned int StartIndex=0)
 Find other string inside this string.
int FindLast (const char *str)
 Find another string start at end of the string.
bool Select (int StartIndex, int EndIndex, String &out)
 Select a part of string.
StringSplit (char ch, int &StringCount)
 Splits this string into many strings separated by char.
bool Insert (const String *str, u32 at)
 Insert another string to this string at the specific location.
const char * ToCharPointer ()
void DelCharPointer ()
 Delete char* array.
u32 GetLenght () const
 Get string lenght.
void ToLower ()
 Unavailable TODO:
- Public Member Functions inherited from kge::KgeUnknown
 KgeUnknown ()
 Constructor.
virtual ~KgeUnknown ()
 Destructor.
virtual void AddRef ()
 Add a reference to the object.
virtual void DecRef ()
 Decrease a reference from the object. if its reference count get 0 then the object will destroy.
u32 GetRefCount ()
 Return resource reference count.
const char * GetDebugText ()
 returns the instance debug text.

Static Public Member Functions

static char * StringCopy (const char *Src)
 A static function that copy from another char*.

Protected Attributes

KgeArraym_vArray
KgeArraym_nullTerminated
char * m_pChar

Additional Inherited Members

- Protected Member Functions inherited from kge::KgeUnknown
void SetDebugText (char *text)

Detailed Description

Definition at line 21 of file String.h.

Constructor & Destructor Documentation

kge::core::String::String ( )

Constructor.

kge::core::String::String ( const char *  str)

Constructor.

kge::core::String::~String ( )

Destructor.

Member Function Documentation

void kge::core::String::Append ( char  c)

Adds a character at the end of the string.

void kge::core::String::DelCharPointer ( )

Delete char* array.

int kge::core::String::Find ( const char *  str,
unsigned int  StartIndex = 0 
)

Find other string inside this string.

int kge::core::String::Find ( const String str,
unsigned int  StartIndex = 0 
)

Find other string inside this string.

int kge::core::String::FindLast ( const char *  str)

Find another string start at end of the string.

u32 kge::core::String::GetLenght ( ) const
inline

Get string lenght.

bool kge::core::String::Insert ( const String str,
u32  at 
)

Insert another string to this string at the specific location.

void kge::core::String::operator+= ( const char *  str)

Append a char* to string.

void kge::core::String::operator+= ( const String str)

Append another string.

void kge::core::String::operator+= ( int  i)

Add an integer to string.

void kge::core::String::operator+= ( float  f)

Add a float to string.

void kge::core::String::operator= ( const char *  str)

operator = with char*

void kge::core::String::operator= ( const String str)

copy operator

bool kge::core::String::operator== ( const char *  str)

Check with char*.

bool kge::core::String::operator== ( String str)

Check with kge::core::String.

char kge::core::String::operator[] ( int  index)

Get the char from string at specific position.

bool kge::core::String::Select ( int  StartIndex,
int  EndIndex,
String out 
)

Select a part of string.

String* kge::core::String::Split ( char  ch,
int &  StringCount 
)

Splits this string into many strings separated by char.

static char* kge::core::String::StringCopy ( const char *  Src)
static

A static function that copy from another char*.

const char* kge::core::String::ToCharPointer ( )
void kge::core::String::ToLower ( )

Unavailable TODO:

Member Data Documentation

KgeArray* kge::core::String::m_nullTerminated
protected

Definition at line 99 of file String.h.

char* kge::core::String::m_pChar
protected

Definition at line 100 of file String.h.

KgeArray* kge::core::String::m_vArray
protected

Definition at line 98 of file String.h.


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