#include <dsutil.h>
Public Methods | |
autostr () | |
autostr (const char *src) | |
autostr (char *src, int size) | |
autostr (int size) | |
~autostr () | |
char * | sprintf (char *format,...) |
char & | operator[] (int i) |
autostr & | operator+ (char *ns) |
autostr & | operator+ (autostr &as) |
autostr & | operator= (char *src) |
autostr & | dup (char *src) |
int | size () |
void | ncpy (char *src, int n) |
char * | c_str () |
operator char * () | |
operator int () | |
int | operator== (char *ns) |
int | operator!= (char *ns) |
|
Create empty autostr object |
|
Create autostr object and copy src inside
|
|
Create autostr object and copy substring of src of length size inside
|
|
Create autostr object and allocate size bytes
|
|
|
|
return pointer to str |
|
create another autostr object pointer to the same data |
|
copy substring of src of length n inside |
|
|
|
return length of string, not size of object |
|
|
|
|
|
append struing ns. Internal string copyed to new location. Very expensive operation. |
|
compare two autostr like strcmp(2) |
|
do strcmp |
|
return i-th character from start if i > 0 and i-th character from and if i < 0
|
|
return size |
|
see sprintf(2). Size of result not checked. |