File: StringBuilder.h

package info (click to toggle)
coco-cpp 20120102-1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, stretch, wheezy
  • size: 448 kB
  • sloc: cpp: 5,544; makefile: 56; sh: 2
file content (29 lines) | stat: -rw-r--r-- 509 bytes parent folder | download | duplicates (5)
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
#if !defined(COCO_STRINGBUILDER_H__)
#define COCO_STRINGBUILDER_H__

#include<stddef.h>

namespace Coco {

class StringBuilder  
{
public:
	StringBuilder(int capacity = 32);
	StringBuilder(const wchar_t *val);
	
	virtual ~StringBuilder();
	void Append(const wchar_t val);
	void Append(const wchar_t *val);
	wchar_t* ToString();
	int GetLength() { return length; };

private:
	void Init(int capacity);
	wchar_t *data;
	int capacity;
	int length;
};

}; // namespace

#endif // !defined(COCO_STRINGBUILDER_H__)