当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: 下面两个函数均是对于一个字符串将其以某个分割符分开:functi
 

 

 ·动态建表(示例)     »显示摘要«
    摘要:beginwith table1 dobegin active := false; databasename := doctor; tabletype := ttparadox; tablename := doctorinf23; if not table1.exists then begin with fielddefs do begin clear; with addfielddef do b......
 ·delphi中延时     »显示摘要«
    摘要:当前位置:delphi园地 → 技巧文章 → 编程心得 → delphi中延时 delphi中延时 日期:2004年8月31日 作者: procedure delay(msecs:integer);varfirsttickcount:longint; begin firsttickcount:=gettickcount;repeatapplication.processmessages;unt......


两个字符串分割函数引出的奇怪问题
下面两个函数均是对于一个字符串将其以某个分割符分开:

【程序编程相关:逻辑日志的使用情况

【推荐阅读:在 DB2 UDB 中复制空间数据

  function splitstrtoarray(const tstring, tsplit: string): tstringlist;   【扩展信息:暂挂 I/O 分割镜像

     //以后成为方法1,这也是«delphi超级猛料»中提到的算法

  var

    t_str, t_item: widestring;

    t_index, t_len: integer;

    t_strlist: tstringlist;

  begin

    t_strlist := tstringlist.create();

    t_str := tstring;

    t_len := length(tstring);

    t_index := pos(tsplit, t_str);  //语句1

    if t_index > 0 then

    begin

      while t_index > 0 do

      begin

        t_item := leftstr(t_str, t_index - 1);

        t_str := midstr(t_str, t_index + 1, t_len);


...   下一页
 ·displaylabel属性(tfield)     »显示摘要«
    摘要:contains the text to display in the corresponding column heading of a data grid.包含了显示在datagrid对应的列标题上的内容delphi 语法: property displaylabel: string; c++ 语法: __property ansistring displaylabel = {read=......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE