String Class Reference
[Types]

Your friend, the string. More...

#include <String.h>

Inheritance diagram for String:
IComparable IMemoryValidate IHashable

List of all members.

Public Member Functions

 String (const char *cp, const int offset, const int len)
 String (const Array< byte > &cp, const int offset, const int len)
 String (const Array< char > &cp, const int offset, const int len)
 String (const char *cp, const int len)
 String (const char *cp)
 String (const String &str)
void Set (const String &cp)
Stringoperator= (const String &str)
Stringoperator= (const char *str)
bool operator== (const String &str) const
bool operator== (const char *cp) const
bool operator!= (const String &str) const
bool operator< (const String &str) const
bool operator> (const String &str) const
bool operator<= (const String &str) const
bool operator>= (const String &str) const
StringPtr Substring (int start, int len) const
StringPtr Substring (int start) const
StringPtr Cat (const String &cp, const int len) const
StringPtr Cat (const String &arg) const
String operator+ (const String &arg) const
StringPtr Right (int len) const
StringPtr Left (int len) const
StringPtr Mid (int start, int stop) const
RefCountPtr< Vector< StringPtr > > Split (const String &cp) const
StringPtr PadRight (char ch, int count)
virtual int Compare (const IComparable *str) const
virtual bool Equals (const IComparable *str) const
virtual bool Equals (const IComparable &a) const
virtual int Compare (const IComparable &a) const
virtual int32 MajicNumber () const
 Class instances with the same majic number are of the same type (can be casted). Majic numbers above 0xFFFF are available for user applications.
int Compare (const String &str) const
int Compare (const char *cp) const
int CompareNoCase (const char *cp) const
int CompareNoCase (const String &sp) const
int IndexOf (const String &str) const
int IndexOf (const String &cp, const int start) const
int IndexOf (const char ch) const
int IndexOf (const char ch, const int start) const
int IndexOfAny (const String &str) const
int LastIndexOf (const char ch) const
bool StartsWith (char ch)
bool StartsWith (const String &str) const
bool EndsWith (const String &str) const
bool EndsWith (char cp) const
bool EqualsIgnoreCase (const String &cp) const
bool Equals (const String &cp) const
bool Equals (const char ch) const
int CountChar (const char ch) const
virtual int32 HashCode () const
const char * GetChars () const
int Length () const
char CharAt (const int idx) const
char operator[] (const int idx) const
StringPtr Replace (const char from, const char to) const
StringPtr Replace (const char *from, const char *to) const
StringPtr ToUpper () const
StringPtr ToLower () const
StringPtr StripQuotes ()
StringPtr RTrim (char ch) const
 Trim spaces from the right side of the string.
StringPtr RTrim ()
StringPtr LTrim (char ch) const
StringPtr LTrim ()
StringPtr Trim () const
 Trim spaces from both sides of the string.
 operator const char * ()
StringPtr Clone () const
RefCountPtr< Array< byte > > ToByteArray () const
StringPtr ToString () const
void UnIntern ()
 copies the contents of the string and marks it as deletable.
void CheckMem () const
void ValidateMem () const

Static Public Member Functions

static StringPtr Fill (char ch, int length)
static int CountChar (const char *str, const int len, const char ch)
static StringPtr Base64Encode (RefCountPtr< Array< byte > > cp)
static StringPtr Base64Encode (const char *cp, int len)
static RefCountPtr< Array< byte > > Base64Decode (const String &cp)
static StringPtr Intern (const char *str)
 wrap a c-string, do not delete when the String is destructed.
static StringPtr Format (const String fmt,...)
static StringPtr FormatVA (const String fmt, va_list args)

Protected Member Functions

void InitWith (const char *cp, const int offset, const int len)

Protected Attributes

const char * m_cstr
bool m_isintern
int m_len

Friends

String operator+ (const char *cp, const String &str)

Detailed Description

Your friend, the string.

Definition at line 77 of file String.h.


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