Public Member Functions | Static Public Member Functions | Private Attributes | Friends
karto::String Class Reference

#include <String.h>

List of all members.

Public Member Functions

void Append (const String &rString)
void Clear ()
void Erase (kt_size_t index, kt_size_t length)
kt_size_t Find (const String &rValue) const
kt_size_t FindFirstOf (const String &rValue) const
kt_size_t FindLastOf (const String &rValue) const
kt_bool operator!= (const String &rOther) const
String operator+ (const String &rOther)
String operator+ (const char *pChar)
kt_bool operator< (const String &rOther) const
Stringoperator= (const String &rOther)
kt_bool operator== (const String &rOther) const
kt_bool operator> (const String &rOther) const
int operator[] (kt_int32u index) const
kt_size_t Size () const
 String ()
 String (char c)
 String (const char *pString)
 String (const char *pString, kt_int32u size)
 String (const String &rOther)
String SubString (kt_size_t index) const
String SubString (kt_size_t index, kt_size_t length) const
const char * ToCString () const
virtual ~String ()

Static Public Member Functions

static String NewLine ()

Private Attributes

StringPrivatem_pStringPrivate

Friends

String operator+ (const char *pChar, const String &rOther)
String operator+ (const String &rOther1, const String &rOther2)
KARTO_FORCEINLINE std::ostream & operator<< (std::ostream &rStream, const String &rString)

Detailed Description

Karto string class that wraps the stl string.

Definition at line 52 of file String.h.


Constructor & Destructor Documentation

Empty string

Definition at line 38 of file String.cpp.

karto::String::String ( char  c)

String from char

Parameters:
ccharacter

Definition at line 43 of file String.cpp.

karto::String::String ( const char *  pString)

String from const char*

Parameters:
pStringC-string

Definition at line 49 of file String.cpp.

karto::String::String ( const char *  pString,
kt_int32u  size 
)

String from const char* up to the given size

Parameters:
pStringC-string
sizesize

Definition at line 55 of file String.cpp.

karto::String::String ( const String rOther)

Copy constructor

Definition at line 61 of file String.cpp.

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

Destructor

Definition at line 67 of file String.cpp.


Member Function Documentation

void karto::String::Append ( const String rString)

Appends a string to this string

Parameters:
rStringstring to append to this string

Definition at line 82 of file String.cpp.

Makes the string into the empty string

Definition at line 122 of file String.cpp.

void karto::String::Erase ( kt_size_t  index,
kt_size_t  length 
)

Deletes a portion of the string starting at the given index for the given number of characters

Parameters:
indexstarting index to delete characters
lengthnumber of characters to delete

Definition at line 112 of file String.cpp.

kt_size_t karto::String::Find ( const String rValue) const

Finds the first index where the given string is a substring of this string

Parameters:
rValuevalue to look for
Returns:
first index where the given string is a substring of this string

Definition at line 97 of file String.cpp.

kt_size_t karto::String::FindFirstOf ( const String rValue) const

Finds the first index where the given string is a substring of this string

Parameters:
rValuevalue to look for
Returns:
first index where the given string is a substring of this string

Definition at line 102 of file String.cpp.

kt_size_t karto::String::FindLastOf ( const String rValue) const

Finds the last index where the given string is a substring of this string

Parameters:
rValuevalue to look for
Returns:
last index where the given string is a substring of this string

Definition at line 107 of file String.cpp.

Returns a newline character as a string return newline character as a string

Definition at line 117 of file String.cpp.

kt_bool karto::String::operator!= ( const String rOther) const

Inequality operator

Definition at line 147 of file String.cpp.

String karto::String::operator+ ( const String rOther)

Concatenation operator

Definition at line 162 of file String.cpp.

karto::String karto::String::operator+ ( const char *  pChar)

Concatenation operator

Definition at line 167 of file String.cpp.

kt_bool karto::String::operator< ( const String rOther) const

Less than operator

Definition at line 152 of file String.cpp.

String & karto::String::operator= ( const String rOther)

Assignment operator

Definition at line 132 of file String.cpp.

kt_bool karto::String::operator== ( const String rOther) const

Equality operator

Definition at line 142 of file String.cpp.

kt_bool karto::String::operator> ( const String rOther) const

Greater than operator

Definition at line 157 of file String.cpp.

int karto::String::operator[] ( kt_int32u  index) const

Gets the character at the given index as an integer

Parameters:
indexindex
Returns:
character at the given index as an integer

Definition at line 172 of file String.cpp.

Gets the string size

Returns:
size of string

Definition at line 77 of file String.cpp.

Returns the substring from the given index until the end of this string

Parameters:
indexstarting index
Returns:
substring from the given index until the end of this string

Definition at line 87 of file String.cpp.

String karto::String::SubString ( kt_size_t  index,
kt_size_t  length 
) const

Returns the substring from the given index for the given number of characters

Parameters:
indexstarting index
lengthnumber of characters for the substring
Returns:
substring from the given index for the given number of characters

Definition at line 92 of file String.cpp.

const char * karto::String::ToCString ( ) const

Gets the string as a C-string

Returns:
const char* version of this string

Definition at line 72 of file String.cpp.


Friends And Related Function Documentation

String operator+ ( const char *  pChar,
const String rOther 
) [friend]

Returns a new string that results from prepending the given character to the given string

Parameters:
pCharcharacter to add
rOtherstring to add
Returns:
string resulting from prepending this string with the given character

Definition at line 211 of file String.h.

String operator+ ( const String rOther1,
const String rOther2 
) [friend]

Result of concatenating two strings

Parameters:
rOther1first string
rOther2second string
Returns:
concatenation of two strings

Definition at line 224 of file String.h.

KARTO_FORCEINLINE std::ostream& operator<< ( std::ostream &  rStream,
const String rString 
) [friend]

Write string to output stream

Definition at line 235 of file String.h.


Member Data Documentation

Definition at line 242 of file String.h.


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


nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Thu Aug 27 2015 14:07:26