sprint 1-alpha
|
Dynamic allocated string, without shared pointer and capacity feature. More...
#include <light_string.h>
Public Types | |
typedef int | size_type |
size type | |
Public Member Functions | |
light_string (const light_string &s, size_type __pos=0) | |
light_string (const light_string &s, size_type __pos, size_type __lenght) | |
light_string (const char *c, size_type __pos=0) | |
Copy costructor from const char *. | |
light_string (const char *c, size_type __pos, size_type __lenght) | |
Copy costructor from const char *. | |
char * | reserve (unsigned int size) |
non cancella il buffer precedente ma ritorna il buffer allocato | |
light_string (const char *a, const char *b) | |
Used to create concatenate string with the + operator. | |
bool | IsValid () const |
bool | empty () const |
Test if string is empty. | |
void | assignf (const char *format,...) |
a printf wrapper to assign string from a formatted format tag | |
light_string & | operator= (const char *str) |
light_string & | operator= (const light_string &s) |
void | push_back (char c) |
add a character to the string (very expensive operation) | |
void | append (const char *str, int add_len) |
append a string to the current string | |
void | append (const char *str) |
void | append (const light_string &str) |
void | operator+= (const char *str) |
void | operator+= (const light_string &str) |
char | operator[] (int i) const |
char & | operator[] (int i) |
const char * | c_str () const |
unsigned int | size () const |
bool | operator== (const char *c) const |
bool | operator== (const light_string &s) const |
bool | Like (const char *c) const |
bool | operator< (const char *string) const |
bool | operator< (const light_string &string) const |
bool | operator> (const char *string) const |
bool | operator> (const light_string &string) const |
size_type | find_first_of (char c, size_type __pos=0) const |
Return the first occurance of a char in string. | |
size_type | find_first_not_of (char c, size_type __pos=0) const |
size_type | find_last_not_of (char c) const |
size_type | find_last_not_of (const char *pattern) const |
size_type | find_last_of (char c, size_type __pos=0) const |
Return the last occurance of a char in string. | |
Static Public Attributes | |
static const size_type | npos = -1 |
npos element | |
Protected Member Functions | |
void | _dtor () |
release memory | |
void | alloc (unsigned int size) |
alloc memory | |
void | _ctor (const char *str, int __lenght) |
void | _ctor (const char *str) |
assegna il buffer | |
void | assign (const char *str) |
delete the internal buffer and reassign it |
Dynamic allocated string, without shared pointer and capacity feature.
Only permit allocation and deallocation, without check with buffer capacity. Reduce code size against std::string library
bool sprint::light_string::Like | ( | const char * | c | ) | const |
compare using case insentive match