blob: 67a78f89518853d9e8c6b35d6694bb4e6f5ca15c (
plain) (
blame)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
//
// bjstring.h
// TestTB
//
// Created by Terrin Eager on 9/26/12.
//
//
#ifndef __TestTB__bjstring__
#define __TestTB__bjstring__
#include <iostream>
#include "bjtypes.h"
class BJString
{
public:
BJString();
BJString(const BJString& scr);
BJString(const char* str);
virtual ~BJString();
BJString& operator=(const char* str);
BJString& operator=(const BJString& str);
bool operator==(const char* str);
bool operator!=(const char* str){return !operator==(str);};
bool operator==(const BJString& str);
bool operator!=(const BJString& str) {return !operator==(str);};
bool operator<(const BJString& str) const;
BJ_COMPARE Compare(const BJString& str);
BJString& operator+=(const char* str);
BJString& operator+=(const BJString& str);
const char* GetBuffer() const;
void Set(const char* str);
void Set(const char* str,BJ_UINT32 len);
void Append(const char* str, BJ_UINT32 len);
bool Contains(const char* str);
BJ_UINT32 GetUINT32();
enum BJ_FORMAT_STYLE {BJSS_BYTE,BJSS_TIME} ;
void Format(BJ_UINT64 number,BJ_FORMAT_STYLE style);
BJ_UINT32 GetLength();
BJ_UINT32 GetBufferLength(){return length;};
private:
void Create(BJ_UINT32 len);
char* buffer;
BJ_UINT32 length;
};
#endif /* defined(__TestTB__bjstring__) */
|