选择显示字体大小

delphi6函数大全(2)


  首部 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
功能 返回第一个搜索到的指针位置
说明 这函数常用于文本中搜索字符串
参考 <null>
例子
///////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; &#36;[strutils.pas
功能 返回探测字符串
说明 根据探测法(soundex)可以找到相进的字符串;http://www.nara.gov/genealogy/coding.html
参考 <null>
例子 edit2.text := soundex(edit1.text, spinedit1.value);
━━━━━━━━━━━━━━━━━━━━━
首部 function soundexint(const atext: string; alength: tsoundexintlength = 4): integer; &#36;[strutils.pas
功能 返回探测整数
说明 alength的值越大解码准确率越高
参考 <null>
例子 spinedit2.value := soundexint(edit1.text, spinedit1.value);
━━━━━━━━━━━━━━━━━━━━━
首部 function decodesoundexint(avalue: integer): string; &#36;[strutils.pas
功能 返回探测整数的解码
说明 decodesoundexint(soundexint('hello')) 相当于 soundex('hello')
参考 <null>
例子 edit2.text := decodesoundexint(spinedit2.value);
━━━━━━━━━━━━━━━━━━━━━
首部 function soundexword(const atext: string): word; &#36;[strutils.pas
功能 返回探测文字数值
说明 没有参数alength已经固定为4
参考 <null>
例子 spinedit2.value := soundexword(edit1.text);
━━━━━━━━━━━━━━━━━━━━━
首部 function decodesoundexword(avalue: word): string; &#36;[strutils.pas
功能 返回探测文字数值的解码
说明 decodesoundexword(soundexword('hello')) 相当于 soundex('hello')
参考 <null>
例子 edit2.text := decodesoundexword(spinedit2.value);
━━━━━━━━━━━━━━━━━━━━━
首部 function soundexsimilar(const atext, aother: string; alength: tsoundexlength = 4): boolean; &#36;[strutils.pas
功能 返回两个字符串的探测字符串是否相同
说明 result := soundex(atext, alength) = soundex(aother, alength)
参考 <null>
例子 checkbox1.checked := soundexsimilar(edit1.text, edit2.text, spinedit1.value);
━━━━━━━━━━━━━━━━━━━━━
首部 function soundexcompare(const atext, aother: string; alength: tsoundexlength = 4): integer; &#36;[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; &#36;[strutils.pas
功能 调用soundexsimilar返回两个字符串的探测字符串是否相同
说明 系统变量ansiresemblesproc的默认值
参考 function strutils.ansiresemblestext
例子 [var ansiresemblesproc: tcomparetextproc = soundexproc;]


 


关键字 本文所属关键字

相关 与本文相关文章

分类 所有文章关键字导航

源码编程相关

Java   Asp   PHP   .Net   XML   C/C++   CGI   VB   Jsp   J2ee   J2se   J2me   EJB   Servlet   Tomcat   Resin   Struts   Weblogic   Eclipse   ANT   GUI   JMS   Web servise   IDEA   Webphere   Hibernate   Spring   Jboss   Applet   Swing   Socket   Javamail   Perl   Ajax   P2P   安全   模式   框架   测试   开源   游戏

SQL数据库相关

My-SQL   Ms-SQL   Access   DB2   Oracle   Sybase   SQLserver   索引   存储过程   加密   数据库   分页   视图  

手机无线相关

3G   Wap   CDMA   GRPS   GSM   IVR   彩信   短信   无线   增值业务

网页设计制作相关

HTML   CSS   网页配色   网页特效   Javascript   VBscript   Dreamweaver   Frontpage   JS   Web   网站设计

网站建设推广相关

建站经验   网站优化   网站排名   推广   Alexa

操作系统/服务器相关

Windows XP   Windows 2000   Windows 2003   Windows Me   Windows 9.x   Linux   UNIX   注册表   操作系统   服务器   应用服务器

图形图像多媒体相关

Photoshop   Fireworks   Flash   Coreldraw   Illustrator   Freehand   Photoimpact   多媒体   图形图像

标准 网站致力的规范

Valid CSS!

无不良内容,无不良广告,无恶意代码

Valid XHTML 1.0 Transitional

creativecommons