随笔分类 -  字符和字符串、字符列表

摘要:Delphi常用字符串函数一、字符转换函数1、ord(input[i])返回字符表达式 input 左端起第 I 字符的ASCII 码值。2、CHAR()将ASCII 码转换为字符。如果没有输入0 ~ 255 之间的ASCII 码值,CHAR() 返回NULL 。3、LOWER()和UPPER()L... 阅读全文
posted @ 2015-07-23 17:17 北极星 - North Star 阅读(651) 评论(0) 推荐(0)
摘要:转自万一博客Delphi 中的哈希表: THashedStringListunit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdC... 阅读全文
posted @ 2015-07-23 12:33 北极星 - North Star 阅读(431) 评论(0) 推荐(0)
摘要:{在delphi中没有能把字符串直接保存为文件的方法,也没有将文件直接作为字符串读出的方法。没有能把字符串转化为内存流的方法,也没有能把内存流转化为字符串的方法。而这里有四个函数恰能做到。代码如下:}function StringToFile(mString: string; mFileName: ... 阅读全文
posted @ 2015-07-12 20:38 北极星 - North Star 阅读(339) 评论(0) 推荐(0)
摘要:关于Delphi中的字符串的详细分析只是浅浅的解析下,让大家可以快速的理解字符串。其中的所有代码均在Delphi7下测试通过。Delphi 4,5,6,7中有字符串类型包括了:短字符串(Short String)长字符串(Long String)宽字符串(Wide String)零结尾字符串(Nul... 阅读全文
posted @ 2015-07-03 22:34 北极星 - North Star 阅读(338) 评论(0) 推荐(0)
摘要:TStringList常用操作//TStringList 常用方法与属性:var List: TStringList; i: Integer;begin List := TStringList.Create; List.Add('Strings1'); {添加} Lis... 阅读全文
posted @ 2015-07-03 22:33 北极星 - North Star 阅读(303) 评论(0) 推荐(0)
摘要:Delphi中的THashedStringList对象Delphi在在IniFiles 单元中定义了THashedStringList类:THashedStringList = class(TStringList) private FValueHash: TStringHash; FNameHash... 阅读全文
posted @ 2015-07-03 22:16 北极星 - North Star 阅读(2330) 评论(0) 推荐(0)