易截截图软件、单文件、免安装、纯绿色、仅160KB

Delphi in a Unicode World Part II

Delphi in a Unicode World Part II:  New RTL Features and
Classes to Support Unicode
By: Nick
Hodges
原文链接:http://dn.codegear.com/article/38498
Abstract: This article will cover the new features of the Tiburon
Runtime Library that will help handle Unicode strings.
//
    Introduction
In Part I, we saw how
Unicode support is a huge benefit for Delphi developers by enabling
communication with all characters set in the Unicode universe. We saw the basics
of the UnicodeString type and how it will be used in Delphi
In Part II, we’ll look at some of the new features of the Delphi Runtime
Library that support Unicode and general string handling.
    TCharacter Class
The Tiburon RTL includes a new class called TCharacter, which is found in the Character unit. It is a sealed class
that consists entirely of static class functions. Developers should not create
instances of TCharacter, but
rather merely call its static class methods directly. Those class functions do a
number of things, including:
Convert characters to upper or lower case
Determine whether a given character is of a certain type, i.e. is the
character a letter, a number, a punctuation mark, etc.
TCharacter uses the standards set forth by the Unicode consortium.
Developers can use the TCharacter class to do many things previously done
with sets of chars. For instance, this code:uses
Character;
begin
if MyChar in [‘a’...’z’, ‘A’...’Z’] then
begin
...
end;
end;
can be easily replaced with uses
Character;
begin
if TCharacter.IsLetter(MyChar) then
begin
...
end;
end;
The Character unit also
contains a number of standalone functions that wrap up the functionality of each
class function from TCharacter, so
if you prefer a simple function call, the above can be written as:uses
Character;
begin
if IsLetter(MyChar) then
begin
...
end;
end;
Thus the TCharacter class can


相关文档:

专门针对delphi的,嵌入源码的病毒(转)

专门针对delphi的,嵌入源码的病毒
如果在 X:\Program Files\Borland\Delphi7\Lib 发现有 SysConst.bak (12KB) 和
SysConst.dcu (18KB),那么恭喜你,中招了。
http://topic.csdn.net/u/20090817/20/102ba10b-82ae-472d-a0be-6d54ce6a331b.html
http://bbs.2ccc.com/topic.asp?topicid=330829
http://bbs.2ccc.com/top ......

Delphi递归加载树形(TreeView)列表

//采用递归方法,D7编译调试通过。
//数据采用ADOQuery读取,并将数据暂存在一个动态数组中,树形列表控件为TreeView。
procedure TForm1.LoadTreeInfo;
type
  TInfo = record
    ID,      //代码      
    Name,    //名称
  &nb ......

括号匹配(delphi)-转

type
TCharStack = class(TStack)
private
function GetTop: Char;
public
function Pop: Char;
function Push(Item: Char): Char;
property Top: Char read GetTop;
end;
const
FindSet = ['(',')'];

implementation
{$R *.dfm}
{ TCharStack }
......

delphi 生成xml 方法 与 delphi txt文件操作

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读写txt文件

http://meidi152.blog.163.com/blog/static/5423302009610103610744/
 
1. memo控件读取txt
memo1.Lines.LoadfromFile('E:\*\*.txt');
2.
Procedure NewTxt(FileName:String);
Var
F : Textfile;
Begin
if fileExists(FileName) then DeleteFile(FileName); {看文件是否存在,在就刪除}
AssignFile(F, ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号