#include <iostream>
#include <string.h>
Go to the source code of this file.
Data Structures | |
struct | string |
struct | string::srep |
Functions | |
string | operator+ (char a, const string &b) |
string | operator+ (const char *a, const string &b) |
string | operator+ (const string &a, const char *b) |
string | operator+ (const string &a, const string &b) |
bool | operator== (const string &x, const char *s) |
bool | operator== (const string &x, const string &y) |
bool | operator!= (const string &x, const char *s) |
bool | operator!= (const string &x, const string &y) |
std::ostream & | operator<< (std::ostream &s, const string &x) |
bool operator!= | ( | const string & | x, | |
const char * | s | |||
) | [inline] |
Definition at line 95 of file string.icc.
References string::c_str().
00095 { 00096 int lena = strlen(a.c_str()); 00097 string s; s.p->s = new char[lena+strlen(b.c_str())+1]; 00098 strcpy(s.p->s, a.c_str()); strcpy(s.p->s+lena, b.c_str()); 00099 return s; 00100 }
Definition at line 88 of file string.icc.
References string::c_str().
00088 { 00089 int lena = strlen(a.c_str()); 00090 string s; s.p->s = new char[lena+strlen(b)+1]; 00091 strcpy(s.p->s, a.c_str()); strcpy(s.p->s+lena, b); 00092 return s; 00093 }
Definition at line 81 of file string.icc.
References string::c_str(), string::p, and string::srep::s.
00081 { 00082 int lena = strlen(a); 00083 string s; s.p->s = new char[lena+strlen(b.c_str())+1]; 00084 strcpy(s.p->s, a); strcpy(s.p->s+lena, b.c_str()); 00085 return s; 00086 }
Definition at line 75 of file string.icc.
References string::c_str(), string::p, and string::srep::s.
00075 { 00076 string s; s.p->s = new char[strlen(b.c_str())+2]; 00077 s.p->s[0] = a; strcpy(s.p->s+1, b.c_str()); 00078 return s; 00079 }
std::ostream& operator<< | ( | std::ostream & | s, | |
const string & | x | |||
) |
bool operator== | ( | const string & | x, | |
const char * | s | |||
) | [inline] |