lang::String Class Reference

The string class. More...

#include <String.h>

Inheritance diagram for lang::String:

Inheritance graph
[legend]
Collaboration diagram for lang::String:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 String ()
 String (const char *pData)
 String (const String &data)
 String (const char *pData, int32 position, int32 length)
virtual ~String ()
const char * getChars () const
int32 findString (const char *pData) const
int32 findChar (char c) const
void setChar (int32 index, char c)
void clearChars (int32 quant)
String substringFixedNumber (int32 n) const
String substring (int32 position, int32 n) const
bool equals (String &string)
void toLowerCase ()
void toUpperCase ()
int32 length () const
char charAt (int32 i) const
 operator const char * () const
void operator= (const char *pData)
void operator= (const String &in)
void concat (const char *pData)
void concat (const String &in)
String operator+ (const char *pData)
String operator+ (const String &in)
int32 operator== (const char *pData) const
int32 operator!= (const char *pData) const
int32 operator> (const char *pData) const
int32 operator< (const char *pData) const
int32 operator>= (const char *pData) const
int32 operator<= (const char *pData) const
const char * toString ()

Static Public Member Functions

static String intToStr (int32 i)


Detailed Description

The string class.

Constructor & Destructor Documentation

lang::String::String (  ) 

Constructor

lang::String::String ( const char *  pData  ) 

Constructor

Parameters:
in Char array

lang::String::String ( const String data  ) 

Copy Constructor

Parameters:
in String reference

lang::String::String ( const char *  pData,
int32  position,
int32  length 
)

Constructor

Parameters:
in Char array
position The position to begin
length The lenght

virtual lang::String::~String (  )  [virtual]

Destructor


Member Function Documentation

const char* lang::String::getChars (  )  const

Return an array of chars

Returns:
Return an array of chars

int32 lang::String::findString ( const char *  pData  )  const

Find a sub-string in the string

Parameters:
str Char array

int32 lang::String::findChar ( char  c  )  const

Find the first occurrence of a character in the string

Parameters:
c The character

void lang::String::setChar ( int32  index,
char  c 
)

Change the character of the string in the respective index

Parameters:
index The index
c The character

void lang::String::clearChars ( int32  quant  ) 

Clear the first quantity of characters in the string

Parameters:
quant The quantity of characters

String lang::String::substringFixedNumber ( int32  n  )  const

Return a string consisting of the first 'n' characters of the original one

Parameters:
n The index

String lang::String::substring ( int32  position,
int32  n 
) const

Return a string consisting of the 'n' characters of the original one that follow the respective position

Parameters:
position The position
n The index

bool lang::String::equals ( String string  ) 

Compare the strings

Parameters:
string The string object

void lang::String::toLowerCase (  ) 

Change all characters to lower-case

void lang::String::toUpperCase (  ) 

Change all characters to upper-case

int32 lang::String::length (  )  const

Return the length of the string in bytes

Returns:
Return the length

char lang::String::charAt ( int32  i  )  const

Indexing operator

Parameters:
i The integer

static String lang::String::intToStr ( int32  i  )  [static]

Convert an integer to string

Parameters:
i The integer
Returns:
the string

lang::String::operator const char * (  )  const

Type cast to char pointer

void lang::String::operator= ( const char *  pData  ) 

Char pointer atribuition operator

Parameters:
in The text

void lang::String::operator= ( const String in  ) 

Atribuition operator

Parameters:
in The string reference

void lang::String::concat ( const char *  pData  ) 

Self-concatenation operator with a char pointer

Parameters:
in The text

void lang::String::concat ( const String in  ) 

Self-concatenation operator

Parameters:
in The string reference

String lang::String::operator+ ( const char *  pData  ) 

Concatenation operator with a char pointer

Parameters:
in The text
Returns:
Return the string

String lang::String::operator+ ( const String in  ) 

Concatenation operator

Parameters:
in The string reference
Returns:
Return the string

int32 lang::String::operator== ( const char *  pData  )  const

Equal compare operator

Parameters:
str The text

int32 lang::String::operator!= ( const char *  pData  )  const

Diference compare operator

Parameters:
str The text

int32 lang::String::operator> ( const char *  pData  )  const

Bigger compare operator

Parameters:
str The text

int32 lang::String::operator< ( const char *  pData  )  const

Less compare operator

Parameters:
str The text

int32 lang::String::operator>= ( const char *  pData  )  const

Bigger equal compare operator

Parameters:
str The text

int32 lang::String::operator<= ( const char *  pData  )  const

Less equal compare operator

Parameters:
str The text

const char* lang::String::toString (  )  [virtual]

See also:
Object::toString()

Implements Object.


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

Generated on Mon Mar 3 10:53:10 2008 for Aika by  doxygen 1.5.5