delphi字符串转换为char数组
var
arrChar : array [0..4] of Char;
b : Byte;
s : string;
begin
s := 'Test';
Move(Pointer(s)^, arrChar, Length(s)); //string to array of char
ShowMessage(arrChar);
b := Ord(s[1]); //First byte string to one single byte
ShowMessage(Char(b));
end;
相关文档:
Delphi字符串函数大全
uses StrUtils;
【字符串函数大全】
首部 function AnsiResemblesText(const AText, AOther: string): Boolean;
$[StrUtils.pas
功能 返回两个字符串是否相似
  ......
//采用递归方法,D7编译调试通过。
//数据采用ADOQuery读取,并将数据暂存在一个动态数组中,树形列表控件为TreeView。
procedure TForm1.LoadTreeInfo;
type
TInfo = record
ID, //代码
Name, //名称
&nb ......
Procedure TForm1.Button1Click(Sender: TObject);
Var
xmlstr,FileName: String;
f: Textfile;
Begin
xmlStr := '<?xml version="1.0" encoding="gb2312"?>';
xmlstr := xmlstr + '<user><name>张三</name><sex>男</sex></user>';
sh ......
Delphi 关键字详解---absolute//它使得你能够创建一个新变量, 并且该变量的起始地址与另一个变量相同.
var
Str: string[32];
StrLen: Byte absolute Str;
//这个声明指定了变量StrLen起始地址与Str相同.
//由于字符串的第0个位置保存了字符串的长度, 所以StrLen的值即字符串长度.
begin
Str := 'abc';
Edit ......
---
Delphi in a Unicode World Part I: What is Unicode, Why do you need
it, and How do you work with it in Delphi?
By: Nick
Hodges
原文链接:http://dn.codegear.com/article/38437
Abstract: This article discusses Unicode, how Delphi developers
can benefit from using Unicode, and ho ......