|
Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
7 #ifndef ELM_STRING_CSTRING_H
8 #define ELM_STRING_CSTRING_H
26 inline int length(
void)
const {
return strlen(
buf); };
27 inline const char *
chars(
void)
const {
return buf; };
33 inline char charAt(
int index)
const {
return buf[index]; };
42 inline int indexOf(
char chr,
int pos)
const
43 {
for(
const char *
p =
buf + pos; *
p;
p++)
if(*
p == chr)
return p -
buf;
return -1; };
46 {
for(
const char *
p =
buf + pos - 1;
p >=
buf;
p--)
if(*
p == chr)
return p -
buf;
return -1; };
57 inline operator const char *(
void)
const {
return buf; };
61 #ifndef ELM_NO_STRING_SHORTCUT
68 #endif // ELM_STRING_CSTRING_H
Printable< T, M > p(const T &data, const M &man)
Definition: Output.h:302
char operator[](int index) const
Definition: CString.h:34
CString substring(int pos) const
Definition: string.h:20
int compare(const CString &str) const
Definition: CString.h:28
const char * buf
Definition: CString.h:19
CString cstring
Definition: CString.h:62
CString(const CString &str)
Definition: CString.h:23
cstring cstr(const char *s)
Definition: CString.h:63
CString(void)
Definition: CString.h:21
int indexOf(char chr) const
Definition: CString.h:41
String concat(const CString str) const
Definition: string.h:22
bool startsWith(const char *str) const
Definition: string.h:24
const char * chars(void) const
Definition: CString.h:27
int lastIndexOf(char chr, int pos) const
Definition: CString.h:45
int indexOf(char chr, int pos) const
Definition: CString.h:42
CString & operator=(const CString &str)
Definition: CString.h:24
int length(void) const
Definition: CString.h:26
string str(const char *s)
Definition: String.h:150
CString(const char *str)
Definition: CString.h:22
char charAt(int index) const
Definition: CString.h:33
bool endsWith(const char *str) const
Definition: string.h:27
int lastIndexOf(char chr) const
Definition: CString.h:44
bool isEmpty(void) const
Definition: CString.h:30