bytestring.h
来自「自己编写的一个采用LZW压缩算法对文件进行压缩的程序;」· C头文件 代码 · 共 49 行
H
49 行
// ByteString.h: interface for the CByteString class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_BYTESTRING_H__10902D53_634C_4981_A1E1_1DE66B8DEA2C__INCLUDED_)
#define AFX_BYTESTRING_H__10902D53_634C_4981_A1E1_1DE66B8DEA2C__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "TypeDefine.h"
class CByteString
{
friend CByteString operator+(const CByteString& str1,const CByteString& str2);
friend CByteString operator+(const CByteString& str, BYTE ch);
friend CByteString operator+(BYTE ch, const CByteString& str);
public:
void Decrease();
CByteString();
CByteString(BYTE ch);
CByteString(BYTE* pBuf, int len);
CByteString(const CByteString& str);
virtual ~CByteString();
int SetSize(int nLen);
int GetLength();
BYTE* GetBuffer();
void Empty();
bool Append(BYTE ch);
bool Append(BYTE* pBuf,int nLen);
int Find(BYTE ch) const;
void SetAt(int nIdx, BYTE ch);
const CByteString& operator=(BYTE ch);
const CByteString& operator=(const CByteString& str);
BYTE& operator[](int nIdx);
int Delete(int nIdx, int nCount=1);
int Insert(int nIdx, BYTE ch);
int Insert(int nIdx, BYTE*pBuf, int nLen);
private:
BYTE* m_pBuf;
int m_curLen;
int m_bufLen;
};
#endif // !defined(AFX_BYTESTRING_H__10902D53_634C_4981_A1E1_1DE66B8DEA2C__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?