zmm::String Class Reference

#include <strings.h>

Public Member Functions

 String ()
 String (const char *str)
 String (char ch)
 String (const char *str, int len)
 String (const String &other)
 String (StringBase *other)
 String (Ref< StringBase > other)
StringBasegetBase ()
 String (NIL_VAR)
 ~String ()
Stringoperator= (const char *str)
Stringoperator= (String other)
Stringoperator= (NIL_VAR)
String operator+ (String other)
String operator+ (const char *str)
String operator+ (char chr)
String operator+ (int x)
String operator+ (unsigned int x)
String operator+ (double x)
int operator== (String other)
int operator== (const char *str)
int operator== (char c)
int operator!= (String other)
int operator!= (const char *str)
int operator!= (char c)
int operator== (NIL_VAR)
int operator!= (NIL_VAR)
 operator Ref< StringBase > ()
int equals (String other, bool ignoreCase=false)
String toLower ()
String toUpper ()
String substring (int from)
String substring (int from, int count)
String reduce (char ch)
 reduces multiple consecutive occurences of the character ch to one occurence
char charAt (int index)
char * charPtrAt (int index)
int index (char ch)
int index (int start, char ch)
int rindex (char ch)
int rindex (int end, char ch)
long toLong ()
off_t toOFF_T ()
int toInt ()
unsigned int toUInt ()
double toDouble ()
int length ()
void setLength (int length)
char * c_str ()
void updateLength ()
bool startsWith (String str)
int find (const char *needle)
int find (String needle)
String replace (String needle, String replacement)
String replaceChar (char needle, char replacement)

Static Public Member Functions

static String from (int x)
static String from (unsigned int x)
static String from (long x)
static String from (unsigned long x)
static String from (double x)
static String from (long long x)
static String allocate (int size)
static String take (const char *data, int length)
static String take (const char *data)
static String refer (const char *str)
static String refer (const char *str, int len)
static String copy (const char *str)

Protected Member Functions

 String (int capacity)

Protected Attributes

StringBasebase

Friends

class StringBuffer

Detailed Description

Definition at line 81 of file strings.h.


Constructor & Destructor Documentation

String::String (  ) 

Definition at line 76 of file strings.cc.

References base, and NULL.

Referenced by allocate(), copy(), from(), refer(), take(), toLower(), and toUpper().

String::String ( const char *  str  ) 

Definition at line 85 of file strings.cc.

References base, NULL, and zmm::Object::retain().

String::String ( char  ch  )  [explicit]

Definition at line 105 of file strings.cc.

References base, and zmm::Object::retain().

String::String ( const char *  str,
int  len 
)

Definition at line 95 of file strings.cc.

References base, NULL, and zmm::Object::retain().

String::String ( const String other  ) 

Definition at line 111 of file strings.cc.

References base, and zmm::Object::retain().

String::String ( StringBase other  ) 

Definition at line 117 of file strings.cc.

References base, and zmm::Object::retain().

String::String ( Ref< StringBase other  ) 

Definition at line 123 of file strings.cc.

References base, zmm::Ref< T >::getPtr(), and zmm::Object::retain().

zmm::String::String ( NIL_VAR   )  [inline]

Definition at line 99 of file strings.h.

References base, and NULL.

String::~String (  ) 

Definition at line 129 of file strings.cc.

References base, and zmm::Object::release().

String::String ( int  capacity  )  [protected]

Definition at line 80 of file strings.cc.

References base, and zmm::Object::retain().


Member Function Documentation

String String::allocate ( int  size  )  [static]

Definition at line 241 of file strings.cc.

References String().

char * String::c_str (  ) 

Definition at line 142 of file strings.cc.

References base, zmm::StringBase::data, and NULL.

Referenced by StringConverter::_convert(), ContentManager::_rescanDirectory(), ContentManager::addContainerChain(), zmm::IntArray::addCSV(), ContentManager::addRecursive(), CdsResourceManager::addResources(), WebRequestHandler::addUpdateIDs(), check_path(), check_path_ex(), FDIOHandler::close(), RExp::compile(), ConfigManager::ConfigManager(), ContentManager::ContentManager(), copy_file(), create_request_handler(), ConfigManager::createDefaultConfig(), ContentManager::createObjectFromFile(), CacheObject::debug(), Dictionary::decode(), error_string(), mxml::Node::escape(), FsObjectComparator(), WebRequestHandler::get_info(), ServeRequestHandler::get_info(), FileRequestHandler::get_info(), getAVIFourCC(), XPath::getAxis(), XPath::getAxisPart(), ConfigManager::getOption(), XPath::getPathPart(), XPath::getSpec(), Filesystem::have(), hex_decode_string(), hex_string_md5(), HMSToSeconds(), ContentManager::initLayout(), ContentManager::invalidateAddTask(), is_executable(), isTheora(), main(), DSOHash< zmm::Array< CacheObject > >::match(), DSBHash< VT >::match(), MemIOHandler::MemIOHandler(), Matcher::next(), zmm::StringTokenizer::nextToken(), normalizePath(), ServeRequestHandler::open(), FileRequestHandler::open(), FileIOHandler::open(), FDIOHandler::open(), web::files::process(), web::directories::process(), web::addObject::process(), web::action::process(), ConnectionManagerService::process_subscription_request(), ContentDirectoryService::process_subscription_request(), ProcessExecutor::ProcessExecutor(), read_text_file(), Filesystem::readDirectory(), CMAddFileTask::run(), run_simple_process(), ConfigManager::save_text(), split_path(), split_string(), StringConverter::StringConverter(), stringHash(), ConnectionManagerService::subscription_update(), ContentDirectoryService::subscription_update(), tempName(), UpdateManager::threadProc(), IOHandlerChainer::threadProc(), ContentManager::threadProc(), BufferedIOHandler::threadProc(), trim_string(), ActionRequest::update(), Server::upnp_callback(), Server::upnp_init(), url_escape(), url_unescape(), ConfigManager::validate(), web_close(), web_get_info(), web_open(), web_seek(), WebAutoscanProcessListComparator(), write_text_file(), and ConfigManager::writeBookmark().

char zmm::String::charAt ( int  index  )  [inline]
char* zmm::String::charPtrAt ( int  index  )  [inline]

Definition at line 171 of file strings.h.

References base, and zmm::StringBase::data.

Referenced by normalizePath().

String String::copy ( const char *  str  )  [static]

Definition at line 277 of file strings.cc.

References base, and String().

Referenced by operator+().

int String::equals ( String  other,
bool  ignoreCase = false 
)

Definition at line 334 of file strings.cc.

References base, and zmm::StringBase::data.

int String::find ( String  needle  ) 

Definition at line 541 of file strings.cc.

References base, zmm::StringBase::data, and find().

int String::find ( const char *  needle  ) 

Definition at line 527 of file strings.cc.

References base, and zmm::StringBase::data.

Referenced by find(), main(), and replace().

String String::from ( long long  x  )  [static]
String String::from ( double  x  )  [static]
String String::from ( unsigned long  x  )  [static]
String String::from ( long  x  )  [static]
String String::from ( unsigned int  x  )  [static]
String String::from ( int  x  )  [static]

Definition at line 197 of file strings.cc.

References zmm::StringBase::data, zmm::StringBase::len, MAX_INT_STRING_LENGTH, and String().

Referenced by operator+().

StringBase* zmm::String::getBase (  )  [inline]

Definition at line 94 of file strings.h.

References base.

Referenced by DSOHash< zmm::Array< CacheObject > >::put(), and DSBHash< VT >::put().

int String::index ( int  start,
char  ch 
)

Definition at line 441 of file strings.cc.

References base, zmm::StringBase::data, and zmm::StringBase::len.

int zmm::String::index ( char  ch  )  [inline]
int String::length (  ) 
zmm::String::operator Ref< StringBase > (  )  [inline]

Definition at line 152 of file strings.h.

References base.

int zmm::String::operator!= ( NIL_VAR   )  [inline]

Definition at line 146 of file strings.h.

References base, and NULL.

int zmm::String::operator!= ( char  c  )  [inline]

Definition at line 137 of file strings.h.

References operator==().

int zmm::String::operator!= ( const char *  str  )  [inline]

Definition at line 133 of file strings.h.

References operator==().

int zmm::String::operator!= ( String  other  )  [inline]

Definition at line 129 of file strings.h.

References operator==().

String String::operator+ ( double  x  ) 

Definition at line 192 of file strings.cc.

References from(), and operator+().

String String::operator+ ( unsigned int  x  ) 

Definition at line 188 of file strings.cc.

References from(), and operator+().

String String::operator+ ( int  x  ) 

Definition at line 184 of file strings.cc.

References from(), and operator+().

String String::operator+ ( char  chr  ) 

Definition at line 176 of file strings.cc.

References operator+().

String String::operator+ ( const char *  str  ) 

Definition at line 163 of file strings.cc.

References base, copy(), zmm::StringBase::data, and zmm::StringBase::len.

String String::operator+ ( String  other  ) 

Definition at line 149 of file strings.cc.

References base, zmm::StringBase::data, and zmm::StringBase::len.

Referenced by operator+().

String& zmm::String::operator= ( NIL_VAR   )  [inline]

Definition at line 110 of file strings.h.

References base, NULL, and zmm::Object::release().

String & String::operator= ( String  other  ) 

Definition at line 322 of file strings.cc.

References base, zmm::Object::release(), and zmm::Object::retain().

String & String::operator= ( const char *  str  ) 

Definition at line 309 of file strings.cc.

References base, NULL, zmm::Object::release(), and zmm::Object::retain().

int zmm::String::operator== ( NIL_VAR   )  [inline]

Definition at line 142 of file strings.h.

References base, and NULL.

int String::operator== ( char  c  ) 

Definition at line 303 of file strings.cc.

References base, zmm::StringBase::data, and zmm::StringBase::len.

int String::operator== ( const char *  str  ) 

Definition at line 295 of file strings.cc.

References base, and zmm::StringBase::data.

int String::operator== ( String  other  ) 

Definition at line 287 of file strings.cc.

References base, and zmm::StringBase::data.

Referenced by operator!=().

String String::reduce ( char  ch  ) 

reduces multiple consecutive occurences of the character ch to one occurence

Parameters:
ch the character to reduce
Returns:
the new string, with ch reduced

Definition at line 476 of file strings.cc.

References base, zmm::StringBase::data, zmm::StringBase::len, nil, and updateLength().

Referenced by SQLStorage::_findObjectByPath(), SQLStorage::addContainerChain(), and SQLStorage::ensurePathExistence().

String String::refer ( const char *  str,
int  len 
) [static]
String String::refer ( const char *  str  )  [static]
String String::replace ( String  needle,
String  replacement 
)

Definition at line 546 of file strings.cc.

References base, zmm::StringBase::data, find(), zmm::StringBase::len, and nil.

Referenced by parseCommandLine().

String String::replaceChar ( char  needle,
char  replacement 
)

Definition at line 561 of file strings.cc.

References base, zmm::StringBase::data, and zmm::StringBase::len.

int String::rindex ( int  end,
char  ch 
)

Definition at line 463 of file strings.cc.

References base, zmm::StringBase::data, and zmm::StringBase::len.

int String::rindex ( char  ch  ) 
void zmm::String::setLength ( int  length  )  [inline]

Definition at line 184 of file strings.h.

References base, and zmm::StringBase::len.

Referenced by error_string().

bool zmm::String::startsWith ( String  str  )  [inline]
String String::substring ( int  from,
int  count 
)

Definition at line 428 of file strings.cc.

References _, base, zmm::StringBase::data, zmm::StringBase::len, and nil.

String String::substring ( int  from  ) 
String String::take ( const char *  data  )  [static]
String String::take ( const char *  data,
int  length 
) [static]
double String::toDouble (  ) 

Definition at line 388 of file strings.cc.

References base, and zmm::StringBase::data.

int zmm::String::toInt (  )  [inline]
long String::toLong (  ) 

Definition at line 377 of file strings.cc.

References base, and zmm::StringBase::data.

Referenced by toInt(), toOFF_T(), and toUInt().

String String::toLower (  ) 
off_t String::toOFF_T (  ) 

Definition at line 401 of file strings.cc.

References base, zmm::StringBase::data, and toLong().

unsigned int zmm::String::toUInt (  )  [inline]

Definition at line 180 of file strings.h.

References toLong().

Referenced by ConfigManager::createAutoscanListFromNodeset().

String String::toUpper (  ) 

Definition at line 363 of file strings.cc.

References base, zmm::StringBase::data, zmm::StringBase::len, nil, and String().

void zmm::String::updateLength (  )  [inline]

Definition at line 189 of file strings.h.

References base, zmm::StringBase::data, and zmm::StringBase::len.

Referenced by reduce().


Friends And Related Function Documentation

friend class StringBuffer [friend]

Definition at line 219 of file strings.h.


Field Documentation


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

Generated on Fri Mar 26 20:16:59 2010 for MediaTomb by  doxygen 1.6.1