易截截图软件、单文件、免安装、纯绿色、仅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中“流”的利用 EXE加密|电子贺卡


一、Delphi中流的基本概念及函数声明   
在Delphi中,所有流对象的基类为TStream类,其中定义了所有流的共同属性和方法。   
TStream类中定义的属性介绍如下:   
1、Size:此属性以字节返回流中数据大小。   
2、Position:此属性控制流中存取指针的位置 ......

delphi开发ocx控件开发笔记(一)

      由于项目的需要,近期开始学习用delphi开发一个软电话控件。
      以前接触过一些delphi开发方面的东西(当然都是些皮毛啦),但没接触过ocx控件的开发,在此把一些简单的东西记下来,一方面以后自己可以再学习,另一方面希望对刚刚学习delphi开发ocx控件的初学 ......

Delphi字符串函数大全

Delphi字符串函数大全
uses StrUtils;
【字符串函数大全】
      首部 function AnsiResemblesText(const AText, AOther: string): Boolean;
      $[StrUtils.pas
      功能 返回两个字符串是否相似
      ......

delphi 注册 com 对象的方法

delphi 注册 com 对象的方法
procedure TForm1.Button3Click(Sender: TObject);
var
 Sd: TSecurityDescriptor;
 begin
   InitializeSecurityDescriptor(@Sd, SECURITY_DESCRIPTOR_REVISION);
    SetSecurityDescriptorDacl(@Sd, true, Nil, false);
    RegSe ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号