str.cpp

changeset 29
55406ce7446e
parent 25
c74bb88f537d
child 30
31ff9aabd506
equal deleted inserted replaced
28:208adc847377 29:55406ce7446e
31 alloclen = strlen (text); 31 alloclen = strlen (text);
32 } 32 }
33 33
34 str::str (const char* c) { 34 str::str (const char* c) {
35 text = new char[1]; 35 text = new char[1];
36 clear (); 36 text[0] = '\0';
37 alloclen = strlen (text); 37 curs = alloclen = 0;
38 append (c); 38 append (c);
39 } 39 }
40 40
41 str::str (char c) { 41 str::str (char c) {
42 text = new char[1]; 42 text = new char[1];
43 clear (); 43 text[0] = '\0';
44 alloclen = strlen (text); 44 curs = alloclen = 0;
45 append (c);
46 }
47
48 str::str (QString c) {
49 text = new char[1];
50 text[0] = '\0';
51 curs = alloclen = 0;
45 append (c); 52 append (c);
46 } 53 }
47 54
48 str::~str () { 55 str::~str () {
49 // delete[] text; 56 // delete[] text;

mercurial