#include <string.hpp>
Definition at line 25 of file string.hpp.
string_rep | ( | nat | n2 | ) | [inline] |
Definition at line 32 of file string.hpp.
00032 : a ((char*) mmx_malloc (n2)), n(n2), l(n2) {}
~string_rep | ( | ) | [inline] |
Definition at line 33 of file string.hpp.
References mmx::mmx_free().
00033 { mmx_free ((void*) a, l); }
void extend | ( | nat | n | ) |
Definition at line 370 of file string.cpp.
References mmx::max(), mmx::mmx_free(), and mmx::mmx_malloc().
Referenced by string::operator<<().
void resize | ( | nat | n | ) |
Definition at line 42 of file string.cpp.
References mmx::max(), mmx::min(), mmx::mmx_free(), and mmx::mmx_malloc().
Referenced by string::operator>>(), and mmx::unescape().
00042 { 00043 nat l2; 00044 if (n2 > l) l2= max (n2, l << 1); 00045 else if (n2 < (l >> 1)) l2= n2; 00046 else { n= n2; return; } 00047 nat m= min (n, n2); 00048 char* b= (char*) mmx_malloc (l2); 00049 for (nat i=0; i<m; i++) b[i]= a[i]; 00050 mmx_free ((void*) a, l); 00051 a= b; 00052 n= n2; 00053 l= l2; 00054 }
double as_double | ( | const string & | s | ) | [friend] |
int as_int | ( | const string & | s | ) | [friend] |
bool busy | ( | const string & | s | ) | [friend] |
Definition at line 110 of file string.hpp.
Definition at line 411 of file string.cpp.
const char* S | ( | const string & | s | ) | [friend] |
char* S | ( | string & | s | ) | [friend] |
friend class string [friend] |
Definition at line 37 of file string.hpp.