Initial
This commit is contained in:
44
guitar/uutool.hpp
Normal file
44
guitar/uutool.hpp
Normal file
@@ -0,0 +1,44 @@
|
||||
#ifndef _GUITAR_UUTOOL_HPP_
|
||||
#define _GUITAR_UUTOOL_HPP_
|
||||
#ifndef _COMMON_WINDOWS_HPP_
|
||||
#include <common/windows.hpp>
|
||||
#endif
|
||||
|
||||
#include <common/array.hpp>
|
||||
|
||||
class String;
|
||||
|
||||
class UUTool
|
||||
{
|
||||
public:
|
||||
static String encode(String strLine);
|
||||
static String decode(String strLine);
|
||||
private:
|
||||
UUTool(void);
|
||||
virtual ~UUTool();
|
||||
static BYTE chEncode(int ch);
|
||||
static BYTE chDecode(int ch);
|
||||
};
|
||||
|
||||
inline
|
||||
UUTool::UUTool(void)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
UUTool::~UUTool()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
BYTE UUTool::chEncode(int ch)
|
||||
{
|
||||
return (ch?(ch&0x3F)+' ':'`');
|
||||
}
|
||||
|
||||
inline
|
||||
BYTE UUTool::chDecode(int ch)
|
||||
{
|
||||
return (ch-' ')&0x3F;
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user