|
String routines to complement <string> && <cstring>:
|
Clase pequeñita para que no se me olvide delete[] para (char*).
More...
#include <psz_string.h>
Public Member Functions | |
| operator char * () const | |
[IMPORTANTE] Convertidor para que funcione como (char*). More... | |
| void | operator= (const char *str) |
Copia el valor de str. More... | |
| void | alloc (unsigned sz) |
Obtiene exactamente sz letras. Le cabe una hilera de hasta (sz-1) letras. Si (sz==0) libera la memoria. More... | |
| void | clear () |
| Borra la hilera. Libera la memoria. More... | |
| psz_string () | |
| Constructor. More... | |
| psz_string (unsigned sz) | |
Constructor que obtiene exactamente sz letras. Le cabe una hilera de hasta (sz-1) letras. More... | |
| psz_string (const psz_string &o) | |
| Constructor de copia. More... | |
| psz_string (const char *str) | |
| Constructor a partir de una hilera. More... | |
| ~psz_string () | |
| Destructor: libera memoria si hace falta. More... | |
| void | swap (psz_string &o) |
Intercambia los valores this <==> str. More... | |
| const char * | c_str () const |
Sinónimo de psz_string::operator char*() const More... | |
Private Attributes | |
| char * | ptr |
| Vector manejado por la clase. More... | |
Clase pequeñita para que no se me olvide delete[] para (char*).
También incluye el operador de copia operator=() para cuando no es cómodo usar strcpy().
Definition at line 32 of file psz_string.h.
|
inline |
Constructor.
Definition at line 49 of file psz_string.h.
|
inline |
Constructor que obtiene exactamente sz letras. Le cabe una hilera de hasta (sz-1) letras.
Definition at line 50 of file psz_string.h.
|
inline |
Constructor de copia.
Definition at line 51 of file psz_string.h.
|
inline |
Constructor a partir de una hilera.
Definition at line 52 of file psz_string.h.
|
inline |
Destructor: libera memoria si hace falta.
Definition at line 53 of file psz_string.h.
|
inline |
[IMPORTANTE] Convertidor para que funcione como (char*).
Definition at line 36 of file psz_string.h.
|
inline |
Copia el valor de str.
Definition at line 37 of file psz_string.h.
|
inline |
Obtiene exactamente sz letras. Le cabe una hilera de hasta (sz-1) letras. Si (sz==0) libera la memoria.
Definition at line 46 of file psz_string.h.
|
inline |
Borra la hilera. Libera la memoria.
Definition at line 47 of file psz_string.h.
|
inline |
Intercambia los valores this <==> str.
Definition at line 54 of file psz_string.h.
|
inline |
Sinónimo de psz_string::operator char*() const
Definition at line 55 of file psz_string.h.
|
private |
Vector manejado por la clase.
Definition at line 33 of file psz_string.h.
1.8.16