函数库:
//寻找与目标字符串最匹配的字符串
function MaxMatchStr(DestStr:String;Strs:array of String):String;
//删除Text中的空格
function FmtText(Text:String):String;
//格式化浮点数,修正其中的浮点误差
function FmtFloat(Value:Extended;Digits:Integer=4):Double;
//在Str中替换子串
procedure ReplaceStr(var Str:String;const SourceStr,DestStr:String);
//表达式Expression中是否含有项目Item
function IncludeItem(Expression,Item:String):Boolean;
//显示消息框
function MsgBox(const Handle:THandle;Text,Caption:String;
Flag:Integer):Integer;
//显示消息
procedure ShowMsg(Sender:TCustomForm;Msg:String);
//显示错误,并终止当前事件
procedure ShowError(Sender:TCustomForm;Error:String);
//显示错误
procedure ErrorMsg(Sender:TCustomForm;Error:String);
//显示警告
procedure ShowWarning(Sender:TCustomForm;Warning:String);
//读取注册表数据名称和值
procedure GetNamesAndValues(Registry:TRegistry;NamesValues:TStrings);
//向注册表中写入数据
procedure WriteValues(Registry:TRegistry;ValueNames:array of String;Values:array of Variant);
//读取注册表中的字符串值
function ReadRegistString(ARootKey:HKEY;Key,Name:String;DefaultValue:String= ):String;
//向注册表中写入字符串值
procedure WriteRegistString(ARootKey:HKEY;Key,Name,Value:String);
//读取注册表中的整数值
function ReadRegistInteger(ARootKey:HKEY;Key,Name:String;DefaultValue:Integer=0):Integer;
//向注册表中写入整数值
procedure WriteRegistWord(ARootKey:HKEY;Key,Name:String;Value:Integer);
//读取注册表中的布尔值
function ReadRegistBool(ARootKey:HKEY;Key,Name:String;DefaultValue:Boolean=False):Boolean;
//向注册表中写入布尔值
procedure WriteRegistBool(ARootKey:HKEY;Key,Name:String;Value:Boolean);
//将日期表示为中文格式:XXXX年XX月XX日
function DateToChinese(ADate:TDate):String;
//取本机机器名
function GetComputerName:String;
//取临时文件目录
function GetWinTempDir:String;
//取系统目录
function GetSystemDir:String;
//生成临时文件名
function GetTempFile(PathName,PrefixStr:String;UniqueID:Integer=0):String;