-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSimpleString.h
More file actions
45 lines (31 loc) · 1.03 KB
/
SimpleString.h
File metadata and controls
45 lines (31 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
///////////////////////////////////////////////////////////////////////////////
//
// SIMPLESTRING.H
//
// One of the design goals of CppUnitLite is to compilation with very old C++
// compilers. For that reason, I've added a simple string class that provides
// only the operations needed in CppUnitLite.
//
///////////////////////////////////////////////////////////////////////////////
#ifndef SIMPLE_STRING
#define SIMPLE_STRING
class SimpleString
{
friend bool operator== (const SimpleString& left, const SimpleString& right);
public:
SimpleString ();
SimpleString (const char *value);
SimpleString (const SimpleString& other);
~SimpleString ();
SimpleString operator= (const SimpleString& other);
char *asCharString () const;
int size() const;
private:
char *buffer;
};
SimpleString StringFrom (bool value);
SimpleString StringFrom (const char *value);
SimpleString StringFrom (long value);
SimpleString StringFrom (double value);
SimpleString StringFrom (const SimpleString& other);
#endif