#include <string.hpp>
Definition at line 50 of file string.hpp.
string | ( | string_rep * | rep2 | ) | [inline] |
Definition at line 105 of file string.hpp.
string | ( | const string_rep * | rep2, | |
bool | with_inc | |||
) | [inline] |
Definition at line 105 of file string.hpp.
Definition at line 105 of file string.hpp.
~string | ( | ) | [inline] |
Definition at line 105 of file string.hpp.
Definition at line 53 of file string.hpp.
00053 : rep (new string_rep (n)) {}
string | ( | char | c | ) |
Definition at line 22 of file string.cpp.
References string::rep, and string::string_rep.
00022 { 00023 rep= new string_rep(1); 00024 rep->a[0]=c; 00025 }
string | ( | const char * | s | ) |
Definition at line 27 of file string.cpp.
References n, string::rep, and string::string_rep.
00027 { 00028 register nat i, n=strlen(a); 00029 rep= new string_rep(n); 00030 for (i=0; i<n; i++) 00031 rep->a[i]=a[i]; 00032 }
void operator delete | ( | void * | ptr, | |
size_t | sz | |||
) | [inline] |
Definition at line 51 of file string.hpp.
void operator delete[] | ( | void * | ptr, | |
size_t | sz | |||
) | [inline] |
Definition at line 51 of file string.hpp.
void* operator new | ( | size_t | sz, | |
void * | where | |||
) | [inline] |
Definition at line 51 of file string.hpp.
void* operator new | ( | size_t | sz | ) | [inline] |
Definition at line 51 of file string.hpp.
void* operator new[] | ( | size_t | sz, | |
void * | where | |||
) | [inline] |
Definition at line 51 of file string.hpp.
void* operator new[] | ( | size_t | sz | ) | [inline] |
Definition at line 51 of file string.hpp.
bool operator!= | ( | const string & | s | ) | const |
bool operator!= | ( | const char * | s | ) | const |
Return the substring from position start to end.
Definition at line 354 of file string.cpp.
References string::rep.
const string_rep * operator-> | ( | ) | const [inline] |
Definition at line 105 of file string.hpp.
string & operator<< | ( | char | c | ) |
Append c to the end of the string.
Definition at line 384 of file string.cpp.
References string_rep::extend(), string::rep, and string::secure().
Definition at line 105 of file string.hpp.
bool operator== | ( | const string & | s | ) | const |
bool operator== | ( | const char * | s | ) | const |
string & operator>> | ( | char & | c | ) |
Retrieve c from the end of the string.
Definition at line 402 of file string.cpp.
References ASSERT, string::rep, string_rep::resize(), and string::secure().
char& operator[] | ( | nat | i | ) | [inline] |
Definition at line 70 of file string.hpp.
References string::rep, and string::secure().
char operator[] | ( | nat | i | ) | const [inline] |
Return the i th character.
Definition at line 69 of file string.hpp.
References string::rep.
00069 { return rep->a[i]; }
void secure | ( | ) | [inline] |
Definition at line 105 of file string.hpp.
Referenced by string::operator<<(), string::operator>>(), and string::operator[]().
double as_double | ( | const string & | s | ) | [friend] |
int as_int | ( | const string & | s | ) | [friend] |
string as_string | ( | double | x | ) | [friend] |
Definition at line 163 of file string.cpp.
00163 { 00164 if (as_string_hook != NULL) 00165 return as_string_hook (x); 00166 if (x == 0.0) return "0"; 00167 char buffer[32]; 00168 sprintf (buffer, "%1.12g", x); 00169 return string (buffer); 00170 }
string as_string | ( | float | x | ) | [friend] |
Definition at line 153 of file string.cpp.
00153 { 00154 if (x == 0.0) return "0"; 00155 char buffer[32]; 00156 sprintf (buffer, "%1.3e", x); 00157 return string (buffer); 00158 }
string as_string | ( | long long unsigned int | i | ) | [friend] |
Definition at line 130 of file string.cpp.
00130 { 00131 char buffer[100]; 00132 sprintf (buffer, "%llu", i); 00133 return string (buffer); 00134 }
string as_string | ( | long long int | i | ) | [friend] |
Definition at line 123 of file string.cpp.
00123 { 00124 char buffer[100]; 00125 sprintf (buffer, "%lld", i); 00126 return string (buffer); 00127 }
string as_string | ( | long unsigned int | i | ) | [friend] |
Definition at line 116 of file string.cpp.
00116 { 00117 char buffer[100]; 00118 sprintf (buffer, "%lu", i); 00119 return string (buffer); 00120 }
string as_string | ( | long int | i | ) | [friend] |
Definition at line 109 of file string.cpp.
00109 { 00110 char buffer[100]; 00111 sprintf (buffer, "%ld", i); 00112 return string (buffer); 00113 }
string as_string | ( | unsigned int | i | ) | [friend] |
Definition at line 102 of file string.cpp.
00102 { 00103 char buffer[100]; 00104 sprintf (buffer, "%u", i); 00105 return string (buffer); 00106 }
string as_string | ( | int | i | ) | [friend] |
Definition at line 95 of file string.cpp.
00095 { 00096 char buffer[100]; 00097 sprintf (buffer, "%d", i); 00098 return string (buffer); 00099 }
string as_string | ( | short unsigned int | i | ) | [friend] |
Definition at line 124 of file string.hpp.
00124 { 00125 return as_string ((unsigned int) i); }
string as_string | ( | short int | i | ) | [friend] |
Definition at line 122 of file string.hpp.
00122 { 00123 return as_string ((int) i); }
string as_string | ( | void * | ptr | ) | [friend] |
Definition at line 88 of file string.cpp.
00088 { 00089 char buffer[100]; 00090 sprintf (buffer, "0x%lx", (unsigned long) ptr); 00091 return string (buffer); 00092 }
string as_string_hexa | ( | int | i | ) | [friend] |
bool busy | ( | const string & | s | ) | [friend] |
Check whether s is non empty.
Definition at line 61 of file string.hpp.
00061 { return s.rep->n != 0; }
Return the i th character of s.
Definition at line 67 of file string.hpp.
00067 { return s.rep->a[i]; }
const char* S | ( | const string & | s | ) | [friend] |
char* S | ( | string & | s | ) | [friend] |
Return a pointer to a copy of s.
Definition at line 63 of file string.hpp.
friend class string_rep [friend] |
Definition at line 103 of file string.hpp.
Referenced by string::string().
string_rep* rep [protected] |
Definition at line 51 of file string.hpp.
Referenced by mmx::copy(), mmx::inside(), string::operator()(), mmx::operator*(), string::operator<<(), string::operator>>(), string::operator[](), string::string(), and mmx::unescape().