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

#include <elm/string/CString.h>

+ Inheritance diagram for CString:

Public Member Functions

 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
 

Protected Attributes

const char * buf
 

Detailed Description

Wrapper around C usual string.

Constructor & Destructor Documentation

◆ CString() [1/3]

◆ CString() [2/3]

CString ( const char *  str)
inline

◆ CString() [3/3]

CString ( const CString str)
inline

Member Function Documentation

◆ charAt()

char charAt ( int  index) const
inline

References CString::buf.

Referenced by CString::operator[]().

◆ chars()

◆ compare()

int compare ( const CString str) const
inline

◆ concat() [1/2]

String concat ( const CString  str) const
inline

◆ concat() [2/2]

String concat ( const String str) const
inline

◆ endsWith() [1/3]

bool endsWith ( const char *  str) const
inline

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

◆ endsWith() [2/3]

bool endsWith ( const CString  str) const
inline

◆ endsWith() [3/3]

bool endsWith ( const String str) const
inline

◆ indexOf() [1/2]

int indexOf ( char  chr) const
inline

References CString::indexOf().

Referenced by CString::indexOf().

◆ indexOf() [2/2]

int indexOf ( char  chr,
int  pos 
) const
inline

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

◆ isEmpty()

bool isEmpty ( void  ) const
inline

References CString::buf.

Referenced by CString::operator bool().

◆ lastIndexOf() [1/2]

int lastIndexOf ( char  chr) const
inline

◆ lastIndexOf() [2/2]

int lastIndexOf ( char  chr,
int  pos 
) const
inline

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

◆ length()

◆ operator bool()

operator bool ( void  ) const
inline

References CString::isEmpty().

◆ operator const char *()

operator const char * ( void  ) const
inline

References CString::buf.

◆ operator=()

CString& operator= ( const CString str)
inline

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

◆ operator[]()

char operator[] ( int  index) const
inline

References CString::charAt().

◆ startsWith() [1/3]

bool startsWith ( const char *  str) const
inline

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

◆ startsWith() [2/3]

bool startsWith ( const CString  str) const
inline

◆ startsWith() [3/3]

bool startsWith ( const String str) const
inline

◆ substring() [1/2]

CString substring ( int  pos) const
inline

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

Referenced by elm::_unqualify().

◆ substring() [2/2]

String substring ( int  pos,
int  len 
) const
inline

References CString::buf.

Member Data Documentation

◆ buf


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