Delphi 函数参考[8]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 hiyaolee 的 blog

      例子 edit2.text := quotedstr(edit1.text);
      ━━━━━━━━━━━━━━━━━━━━━
      首部 function ansiquotedstr(const s: string; quote: char): string;
      $[sysutils.pas
      功能 返回字符串s以字符quote为引号的表现形式
      说明 ansiquotedstr('hello"world',
      '@')='@hello"world@';ansiquotedstr('hello"world', '"')='"hello""world"'
      参考 function sysutils.ansistrscan
      例子 edit2.text := ansiquotedstr(edit1.text, '"');
      ━━━━━━━━━━━━━━━━━━━━━
      首部 function ansiextractquotedstr(var src: pchar; quote: char): string;
      $[sysutils.pas
      功能 返回以字符quote为引号的表现形式原形
      说明 表现形式非法时src不变否则为空
      参考 function sysutils.ansistrscan
      例子
      ///////begin ansiextractquotedstr
      procedure tform1.button1click(sender: tobject);
      var
      p: pchar;
      begin
      p := pchar(edit1.text);
      edit2.text := ansiextractquotedstr(p, '"');
      edit3.text := p;
      end;
      ///////end ansiextractquotedstr
      ━━━━━━━━━━━━━━━━━━━━━
      首部 function ansidequotedstr(const s: string; aquote: char): string;
      $[sysutils.pas
      功能 返回以字符aquote为引号的表现形式原形
      说明 表现形式非法时则返回s
      参考 function sysutils.ansiextractquotedstr
      例子 edit2.text := ansidequotedstr(edit1.text, '"');
      ━━━━━━━━━━━━━━━━━━━━━
      首部 function adjustlinebreaks(const s: string; style: ttextlinebreakstyle =
      {$ifdef linux} tlbslf {$endif} {$ifdef mswindows} tlbscrlf {$endif}):
      string; $[sysutils.pas
      功能 返回将给定字符串的行分隔符调整为cr/lf序列
      说明
      adjustlinebreaks('1'#13'2'#13)='1'#13#10'2'#13#10;adjustlinebreaks('1'#10'2'#10)='1'#13#10'2'#13#10
      参考 function sysutils.strnextchar
      例子 <null>
      ━━━━━━━━━━━━━━━━━━━━━
      首部 function isvalidident(const ident: string): boolean; $[sysutils.pas
      功能 返回字符串ident是否是正确的标识符
      说明 标识符::字母|下划线[字母|下划线|数字]...
      参考 <null>
      例子 checkbox1.checked := isvalidident(edit1.text);
      ━━━━━━━━━━━━━━━━━━━━━
      首部 function inttostr(value: integer): string; overload; $[sysutils.pas
      首部 function inttostr(value: int64): string; overload; $[sysutils.pas
      功能 返回整数value转换成字符串
      说明 format('%d', [value])
      参考 function sysutils.fmtstr
      例子 edit2.text := inttostr(spinedit1.value);
      ━━━━━━━━━━━━━━━━━━━━━
      首部 function inttohex(value: integer; digits: integer): string; overload;
      $[sysutils.pas
      首部 function inttohex(value: int64; digits: integer): string; overload;
      $[sysutils.pas
      功能 返回整数value转换成十六进制表现结果;format('%.*x', [digits, value])
      说明 参数digits指定字符最小宽度;最小宽度不足时将用0填充
      参考 function sysutils.fmtstr
      例子 edit2.text := inttohex(spinedit1.value, spinedit2.value);
      ━━━━━━━━━━━━━━━━━━━━━
      首部 function strtoint(const s: string): integer; $[sysutils.pas
      功能 返回字符串s转换成整数
      说明 字符串非整数表达时将引起异常
      参考 procedure system.val
      例子 spinedit1.value := strtoint(edit1.text);

本文关键:Delphi 函数参考
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top