Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
String Class Reference

#include <elm/xom/String.h>

+ Inheritance diagram for String:

Public Member Functions

 String (void)
 
 String (const char *str)
 
 String (const char_t *str)
 
 String (const CString &str)
 
 String (const String &str)
 
void copy (void)
 
void free (void)
 
void escape (io::OutStream &out) const
 
void escape (io::Output &out) const
 
elm::string escape (void) const
 
Stringoperator= (const String &str)
 
 operator char_t * (void) const
 
- Public Member Functions inherited from CString
 CString (void)
 
 CString (const char *str)
 
 CString (const CString &str)
 
CStringoperator= (const CString &str)
 
int length (void) const
 
const char * chars (void) const
 
int compare (const CString &str) const
 
bool isEmpty (void) const
 
 operator bool (void) const
 
char charAt (int index) const
 
char operator[] (int index) const
 
CString substring (int pos) const
 
String substring (int pos, int len) const
 
String concat (const CString str) const
 
String concat (const String &str) const
 
int indexOf (char chr) const
 
int indexOf (char chr, int pos) const
 
int lastIndexOf (char chr) const
 
int lastIndexOf (char chr, int pos) const
 
bool startsWith (const char *str) const
 
bool startsWith (const CString str) const
 
bool startsWith (const String &str) const
 
bool endsWith (const char *str) const
 
bool endsWith (const CString str) const
 
bool endsWith (const String &str) const
 
 operator const char * (void) const
 

Additional Inherited Members

- Protected Attributes inherited from CString
const char * buf
 

Detailed Description

String class used in XOM XML extension.

Constructor & Destructor Documentation

◆ String() [1/5]

String ( void  )
inline

◆ String() [2/5]

String ( const char *  str)
inline

◆ String() [3/5]

String ( const char_t str)
inline

◆ String() [4/5]

String ( const CString str)
inline

◆ String() [5/5]

String ( const String str)
inline

Member Function Documentation

◆ copy()

void copy ( void  )

Copy the string (ensuring independence from the initialization string).

References CString::buf, and CString::chars().

◆ escape() [1/3]

void escape ( io::Output out) const
inline

References String::escape().

Referenced by String::escape().

◆ escape() [2/3]

void escape ( io::OutStream out) const

The string is output and XML special characters are escaped (mainly <, > and &).

Parameters
outStream to output to.

References CString::buf, and elm::io::p().

◆ escape() [3/3]

elm::string escape ( void  ) const
inline

References CString::buf, and String::escape().

Referenced by String::escape().

◆ free()

void free ( void  )

Free the string contained in this object. Usually only used if a call to copy() has been performed.

References CString::buf.

Referenced by XOMUnserializer::onEnum(), XOMUnserializer::onValue(), Serializer::writeEndTag(), and Serializer::writeStartTag().

◆ operator char_t *()

operator char_t * ( void  ) const
inline

References CString::buf.

◆ operator=()

String& operator= ( const String str)
inline

References CString::buf, and elm::str().


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