欧普下载是国内较新、较齐、较安全的软件下载基地!
当前位置:首页 ›› 其他软件 ›› 电子书籍 ›› Delphi6函数大全下载

Delphi6函数大全 chm版

Delphi6函数大全[下载地址]
Delphi6函数大全 chm版

Delphi6函数大全是为delphi6推出的一款常用的函数,包含五大函数,提供了详细的函数用法和说明,供delphi爱好者参考,可以大大提高编程人员的效率,有需要的朋友赶快下载吧!

Delphi6函数大全 chm版

delphi特色

Delphi是Borland公司研发的可视化开发工具,可在Windows3.x、Windows95、WindowsNT、WindowsXP、WindowsVista、Windows7等环境下使用。当前,Delphi 也可以在LINUX平台上开发应用,其在LINUX上的对应产品Kylix。

Delphi 拥有一个可视化的集成开发环境(IDE),采用面向对象的编程语言ObjectPascal和基于部件的开发结构框架。Delphi它提供了500多个可供使用的构件,利用这些部件,开发人员可以快速地构造出应用系统。开发人员也可以根据自己的需要修改部件或用Delphi本身编写自己的部件。

“真正的程序员用C++,聪明的程序员用Delphi”,这句话是对Delphi最经典、最实在的描述。Delphi被称为第四代编程语言,它具有简单、高效、功能强大的特点。和VC相比,Delphi更简单、更易于掌握,而在功能上却丝毫不逊色;和VB相比,Delphi则功能更强大、更实用。可以说Delphi同时兼备了VC功能强大和VB简单易学的特点。它一直是程序员至爱的编程工具。Delphi具有以下的特性:基于窗体和面向对象的方法,高速的编译器,强大的数据库支持,与Windows编程紧密结合,强大而成熟的组件技术。但最重要的还是Object Pascal语言,它才是一切的根本。Object Pascal语言是在Pascal语言的基础上发展起来的 ,简单易学。

Delphi提供了各种开发工具,包括集成环境、图像编辑(Image Editor),以及各种开发数据库的应用程序,如DesktopDataBase Expert等。除此之外,还允许用户挂接其它的应用程序开发工具,如Borland公司的资源编辑器(Resource Workshop)。

在Delphi众多的优势当中,它在数据库方面的特长显得尤为突出:适应于多种数据库结构,从客户机/服务机模式到多层数据结构模式;高效率的数据库管理系统和新一代更先进的数据库引擎;最新的数据分析手段和提供大量的企业组件。

Delphi6函数

首部 function AnsiResemblesText(const AText, AOther: string): Boolean; $[StrUtils.pas

功能 返回两个字符串是否相似

说明 ANSI(American National Standards Institute)美国国家标准协会;不区分大小写

参考 function StrUtils.SoundexProc; var StrUtils.AnsiResemblesProc

例子 CheckBox1.Checked := AnsiResemblesText(Edit1.Text, Edit2.Text);

━━━━━━━━━━━━━━━━━━━━━

首部 function AnsiContainsText(const AText, ASubText: string): Boolean; $[StrUtils.pas

功能 返回字符串AText是否包含子串ASubText

说明 不区分大小写

参考 function StrUtils.AnsiUppercase; function StrUtils.AnsiPos

例子 CheckBox1.Checked := AnsiContainsText(Edit1.Text, Edit2.Text);

━━━━━━━━━━━━━━━━━━━━━

首部 function AnsiStartsText(const ASubText, AText: string): Boolean; $[StrUtils.pas

功能 返回字符串AText是否以子串ASubText开头

说明 不区分大小写

参考 function Windows.CompareString

例子 CheckBox1.Checked := AnsiStartsText(Edit1.Text, Edit2.Text);

━━━━━━━━━━━━━━━━━━━━━

首部 function AnsiEndsText(const ASubText, AText: string): Boolean; $[StrUtils.pas

功能 返回字符串AText是否以子串ASubText结尾

说明 不区分大小写

参考 function Windows.CompareString

例子 CheckBox1.Checked := AnsiEndsText(Edit1.Text, Edit2.Text);

━━━━━━━━━━━━━━━━━━━━━

首部 function AnsiReplaceText(const AText, AFromText, AToText: string): string; $[StrUtils.pas

功能 返回字符串AText中用子串AFromText替换成子串AToText的结果

说明 不区分大小写

参考 function SysUtils.StringReplace; type SysUtils.TReplaceFlags

例子 Edit4.Text := AnsiReplaceText(Edit1.Text, Edit2.Text, Edit3.Text);

━━━━━━━━━━━━━━━━━━━━━

首部 function AnsiMatchText(const AText: string; const AValues: array of string): Boolean; $[StrUtils.pas

功能 返回字符串数组AValues中是否包含字符串AText

说明 不区分大小写

参考 function StrUtils.AnsiIndexText

例子 CheckBox1.Checked := AnsiMatchText(Edit1.Text, ['a1', 'a2', 'a3', 'a4']);

━━━━━━━━━━━━━━━━━━━━━

首部 function AnsiIndexText(const AText: string; const AValues: array of string): Integer; $[StrUtils.pas

功能 返回字符串AText在字符串数组AValues中的位置

说明 不区分大小写;如果不包含则返回-1

参考 function SysUtils.AnsiSameText

例子 SpinEdit1.Value := AnsiIndexText(Edit1.Text, ['a1', 'a2', 'a3', 'a4']);

━━━━━━━━━━━━━━━━━━━━━

首部 function AnsiContainsStr(const AText, ASubText: string): Boolean; $[StrUtils.pas

功能 返回字符串AText是否包含子串ASubText

说明 区分大小写

参考 function StrUtils.AnsiPos

例子 CheckBox1.Checked := AnsiContainsStr(Edit1.Text, Edit2.Text);

━━━━━━━━━━━━━━━━━━━━━

首部 function AnsiStartsStr(const ASubText, AText: string): Boolean; $[StrUtils.pas

功能 返回字符串AText是否以子串ASubText开头

说明 区分大小写

参考 function SysUtils.AnsiSameStr

例子 CheckBox1.Checked := AnsiStartsStr(Edit1.Text, Edit2.Text);

━━━━━━━━━━━━━━━━━━━━━

首部 function AnsiEndsStr(const ASubText, AText: string): Boolean; $[StrUtils.pas

功能 返回字符串AText是否以子串ASubText结尾

说明 区分大小写

参考 function SysUtils.AnsiSameStr

例子 CheckBox1.Checked := AnsiEndsStr(Edit1.Text, Edit2.Text);

━━━━━━━━━━━━━━━━━━━━━

首部 function AnsiReplaceStr(const AText, AFromText, AToText: string): string; $[StrUtils.pas

功能 返回字符串AText中用子串AFromText替换成子串AToText的结果

说明 区分大小写

参考 function SysUtils.StringReplace; type SysUtils.TReplaceFlags

例子 Edit4.Text := AnsiReplaceStr(Edit1.Text, Edit2.Text, Edit3.Text);

━━━━━━━━━━━━━━━━━━━━━

首部 function AnsiMatchStr(const AText: string; const AValues: array of string): Boolean; $[StrUtils.pas

功能 返回字符串数组AValues中是否包含字符串AText

说明 区分大小写

参考 function StrUtils.AnsiIndexStr

例子 CheckBox1.Checked := AnsiMatchStr(Edit1.Text, ['a1', 'a2', 'a3', 'a4']);

━━━━━━━━━━━━━━━━━━━━━

首部 function AnsiIndexStr(const AText: string; const AValues: array of string): Integer; $[StrUtils.pas

功能 返回字符串AText在字符串数组AValues中的位置

说明 区分大小写

参考 function SysUtils.AnsiSameStr

例子 SpinEdit1.Value := AnsiIndexStr(Edit1.Text, ['a1', 'a2', 'a3', 'a4']);

━━━━━━━━━━━━━━━━━━━━━

首部 function DupeString(const AText: string; ACount: Integer): string; $[StrUtils.pas

功能 返回字符串AText的ACount个复本

说明 当ACount为0时返回''

参考 function System.SetLength

例子 Edit3.Text := DupeString(Edit1.Text, SpinEdit1.Value);

━━━━━━━━━━━━━━━━━━━━━

首部 function ReverseString(const AText: string): string; $[StrUtils.pas

功能 返回字符串AText的反序

说明 ReverseString('1234') = '4321'

参考 function System.SetLength

例子 Edit3.Text := ReverseString(Edit1.Text);

━━━━━━━━━━━━━━━━━━━━━

首部 function StuffString(const AText: string; AStart, ALength: Cardinal; const ASubText: string): string; $[StrUtils.pas

功能 返回嵌套字符串

说明 AStart:嵌套开始位置;ALength:嵌套长度;StuffString('abcd', 2, 0, '12') = 'a12bcd'

参考 function System.Copy

例子 Edit3.Text := StuffString(Edit1.Text, SpinEdit1.Value, SpinEdit2.Value, Edit2.Text);

━━━━━━━━━━━━━━━━━━━━━

首部 function RandomFrom(const AValues: array of string): string; overload; $[StrUtils.pas

功能 随机返回字符串数组AValues中的一个元素

说明 之前建议执行Randomize

参考 function System.Random

例子 Randomize; Edit3.Text := RandomFrom(['a1', 'a2', 'a3', 'a4']);

━━━━━━━━━━━━━━━━━━━━━

首部 function IfThen(AValue: Boolean; const ATrue: string; AFalse: string = ''): string; overload; $[StrUtils.pas

功能 返回指定的逻辑字符串

说明 IfThen(True, '是', '否') = '是';IfThen(False, '是', '否') = '否'

参考

例子 Edit3.Text := IfThen(CheckBox1.Checked, Edit1.Text, Edit2.Text);

━━━━━━━━━━━━━━━━━━━━━

首部 function LeftStr(const AText: string; const ACount: Integer): string; $[StrUtils.pas

功能 返回字符串AText左边的ACount个字符

说明 LeftStr('123456', 3) = '123'

参考 function System.Copy

例子 Edit3.Text := LeftStr(Edit1.Text, SpinEdit1.Value);

━━━━━━━━━━━━━━━━━━━━━

首部 function RightStr(const AText: string; const ACount: Integer): string; $[StrUtils.pas

功能 返回字符串AText右边的ACount个字符

说明 RightStr('123456', 3) = '456'

参考 function System.Copy

例子 Edit3.Text := RightStr(Edit1.Text, SpinEdit1.Value);

━━━━━━━━━━━━━━━━━━━━━

首部 function MidStr(const AText: string; const AStart, ACount: Integer): string; $[StrUtils.pas

功能 返回字符串AText从AStart开始的ACount个字符

说明 其实就是Copy

参考 function System.Copy

例子 Edit3.Text := MidStr(Edit1.Text, SpinEdit1.Value, SpinEdit2.Value);

━━━━━━━━━━━━━━━━━━━━━

首部 function SearchBuf(Buf: PChar; BufLen: Integer; SelStart, SelLength: Integer; SearchString: String; Options: TStringSearchOptions = [soDown]): PChar; $[StrUtils.pas

功能 返回第一个搜索到的指针位置

说明 这函数常用于文本中搜索字符串

参考

例子

///////Begin SearchBuf

function SearchEdit(EditControl: TCustomEdit; const SearchString: String;

SearchOptions: TStringSearchOptions; FindFirst: Boolean = False): Boolean;

var

Buffer, P: PChar;

Size: Word;

begin

Result := False;

if (Length(SearchString) = 0) then Exit;

Size := EditControl.GetTextLen;

if (Size = 0) then Exit;

Buffer := StrAlloc(Size + 1);

try

EditControl.GetTextBuf(Buffer, Size + 1);

P := SearchBuf(Buffer, Size, EditControl.SelStart, EditControl.SelLength,

SearchString, SearchOptions);

if P <> nil then begin

EditControl.SelStart := P - Buffer;

EditControl.SelLength := Length(SearchString);

Result := True;

end;

finally

StrDispose(Buffer);

end;

end;

procedure TForm1.Button1Click(Sender: TObject);

var

SearchOptions: TStringSearchOptions;

begin

SearchOptions := [];

if CheckBox1.Checked then

Include(SearchOptions, soDown);

if CheckBox2.Checked then

Include(SearchOptions, soMatchCase);

if CheckBox3.Checked then

Include(SearchOptions, soWholeWord);

SearchEdit(Memo1, Edit1.Text, SearchOptions);

Memo1.SetFocus;

end;

///////End SearchBuf

━━━━━━━━━━━━━━━━━━━━━

首部 function Soundex(const AText: string; ALength: TSoundexLength = 4): string; $[StrUtils.pas

功能 返回探测字符串

说明 根据探测法(Soundex)可以找到相进的字符串;http://www.nara.gov/genealogy/coding.html

参考

例子 Edit2.Text := Soundex(Edit1.Text, SpinEdit1.Value);

━━━━━━━━━━━━━━━━━━━━━

首部 function SoundexInt(const AText: string; ALength: TSoundexIntLength = 4): Integer; $[StrUtils.pas

功能 返回探测整数

说明 ALength的值越大解码准确率越高

参考

例子 SpinEdit2.Value := SoundexInt(Edit1.Text, SpinEdit1.Value);

━━━━━━━━━━━━━━━━━━━━━

首部 function DecodeSoundexInt(AValue: Integer): string; $[StrUtils.pas

功能 返回探测整数的解码

说明 DecodeSoundexInt(SoundexInt('hello')) 相当于 Soundex('hello')

参考

例子 Edit2.Text := DecodeSoundexInt(SpinEdit2.Value);

━━━━━━━━━━━━━━━━━━━━━

首部 function SoundexWord(const AText: string): Word; $[StrUtils.pas

功能 返回探测文字数值

说明 没有参数ALength已经固定为4

参考

例子 SpinEdit2.Value := SoundexWord(Edit1.Text);

━━━━━━━━━━━━━━━━━━━━━

首部 function DecodeSoundexWord(AValue: Word): string; $[StrUtils.pas

功能 返回探测文字数值的解码

说明 DecodeSoundexWord(SoundexWord('hello')) 相当于 Soundex('hello')

参考

例子 Edit2.Text := DecodeSoundexWord(SpinEdit2.Value);

━━━━━━━━━━━━━━━━━━━━━

首部 function SoundexSimilar(const AText, AOther: string; ALength: TSoundexLength = 4): Boolean; $[StrUtils.pas

功能 返回两个字符串的探测字符串是否相同

说明 Result := Soundex(AText, ALength) = Soundex(AOther, ALength)

参考

例子 CheckBox1.Checked := SoundexSimilar(Edit1.Text, Edit2.Text, SpinEdit1.Value);

━━━━━━━━━━━━━━━━━━━━━

首部 function SoundexCompare(const AText, AOther: string; ALength: TSoundexLength = 4): Integer; $[StrUtils.pas

功能 返回比较两个字符串的探测字符串的结果

说明 Result := AnsiCompareStr(Soundex(AText, ALength), Soundex(AOther, ALength))

参考 function SysUtils.AnsiCompareStr

例子 SpinEdit2.Value := SoundexCompare(Edit1.Text, Edit2.Text, SpinEdit1.Value);

━━━━━━━━━━━━━━━━━━━━━

首部 function SoundexProc(const AText, AOther: string): Boolean; $[StrUtils.pas

功能 调用SoundexSimilar返回两个字符串的探测字符串是否相同

说明 系统变量AnsiResemblesProc的默认值

参考 function StrUtils.AnsiResemblesText

例子 [var AnsiResemblesProc: TCompareTextProc = SoundexProc;]

Delphi专题
Delphi专题
Delphi是由Borland公司推出的一款专业的应用程序开发工具,采用面向对象的编程语言ObjectPascal和基于部件的开发结构框架,旗下包含多版本的Delphi软件,从一开始的delphi xe2到最新版的delphi xe10,还
下载Delphi6函数大全 chm版
本地下载地址:
本地电信下载
本地电信下载
本地联通下载
本地联通下载
本地迅雷下载
本地迅雷下载
移动用户下载
移动用户下载

版权声明:本站提的序列号、注册码、注册机、补丁等均来自互联网,仅供学习交流之用,请在下载后24小时内删除。

猜您喜欢
相关文章
软件评论
请自觉遵守互联网相关政策法规,评论内容只代表网友观点,与本站立场无关!
    登录   注册