Delphi编程--字符处理
2012-02-01 03:36
316 查看
======================================================
注:本文源代码点此下载
======================================================
定位
function ansilastchar(const s: string): pchar;返回ansi字符串的最后一个字符,支持多字节字符
function ansistrlastchar(p: pchar): pchar;返回以空字符串结尾的ansi字符串的最后一个字符(不包括空字符),在多字节字符中,可能不等于最后一个字节
function bytetocharindex(const s: string; index: integer): integer;返回包含index指定字节的字符位置
function chartobyteindex(const s: string; index: integer): integer;返回index指定字符的字节位置
function nextcharindex(const s: string; index: integer): integer;返回index指定字符的下一个字符起始字节位置
function strnextchar(const str: pchar): pchar;返回指定字符串的下一个字符
计数
function bytetocharlen(const s: string; maxlen: integer): integer;返回包含maxlen指定字节数的字符的个数
function charlength(const s: string; index: integer): integer;返回字符串的字节长度
function chartobytelen(const s: string; maxlen: integer): integer;返回maxlen指定的字符长度的串的字节长度
function strcharlength(const str: pchar): integer;返回字符串中第一个字符的字节长度
转换
function ansilowercasefilename(const s: string): string;将ansi字符串表示的文件名转换为小写
function ansiuppercasefilename(const s: string): string;将ansi字符串表示的文件名转换为大写
判断
function ansicomparefilename(const s1, s2: string): integer;比较两个ansi字符文件名称大小,不识别大小写
function bytetype(const s: string; index: integer): tmbcsbytetype;返回index所指定字节是单字节符还是双字节字符中第一字节或第二字节
function samefilename(const s1, s2: string): boolean;判断文件名是否相同
function strbytetype(str: pchar; index: cardinal): tmbcsbytetype;判断index指定字节是单字节字符还是双字节字符中第一字节或第二字节
======================================================
在最后,我邀请大家参加新浪APP,就是新浪免费送大家的一个空间,支持PHP+MySql,免费二级域名,免费域名绑定
这个是我邀请的地址,您通过这个链接注册即为我的好友,并获赠云豆500个,价值5元哦!短网址是http://t.cn/SXOiLh我创建的小站每天访客已经达到2000+了,每天挂广告赚50+元哦,呵呵,饭钱不愁了,\(^o^)/
注:本文源代码点此下载
======================================================
定位
function ansilastchar(const s: string): pchar;返回ansi字符串的最后一个字符,支持多字节字符
function ansistrlastchar(p: pchar): pchar;返回以空字符串结尾的ansi字符串的最后一个字符(不包括空字符),在多字节字符中,可能不等于最后一个字节
function bytetocharindex(const s: string; index: integer): integer;返回包含index指定字节的字符位置
function chartobyteindex(const s: string; index: integer): integer;返回index指定字符的字节位置
function nextcharindex(const s: string; index: integer): integer;返回index指定字符的下一个字符起始字节位置
function strnextchar(const str: pchar): pchar;返回指定字符串的下一个字符
计数
function bytetocharlen(const s: string; maxlen: integer): integer;返回包含maxlen指定字节数的字符的个数
function charlength(const s: string; index: integer): integer;返回字符串的字节长度
function chartobytelen(const s: string; maxlen: integer): integer;返回maxlen指定的字符长度的串的字节长度
function strcharlength(const str: pchar): integer;返回字符串中第一个字符的字节长度
转换
function ansilowercasefilename(const s: string): string;将ansi字符串表示的文件名转换为小写
function ansiuppercasefilename(const s: string): string;将ansi字符串表示的文件名转换为大写
判断
function ansicomparefilename(const s1, s2: string): integer;比较两个ansi字符文件名称大小,不识别大小写
function bytetype(const s: string; index: integer): tmbcsbytetype;返回index所指定字节是单字节符还是双字节字符中第一字节或第二字节
function samefilename(const s1, s2: string): boolean;判断文件名是否相同
function strbytetype(str: pchar; index: cardinal): tmbcsbytetype;判断index指定字节是单字节字符还是双字节字符中第一字节或第二字节
======================================================
在最后,我邀请大家参加新浪APP,就是新浪免费送大家的一个空间,支持PHP+MySql,免费二级域名,免费域名绑定
这个是我邀请的地址,您通过这个链接注册即为我的好友,并获赠云豆500个,价值5元哦!短网址是http://t.cn/SXOiLh我创建的小站每天访客已经达到2000+了,每天挂广告赚50+元哦,呵呵,饭钱不愁了,\(^o^)/
相关文章推荐
- Delphi编程--字符处理
- Windows SDK编程(Delphi版) 之 消息处理
- vc串口编程使用mscomm控件的,接受字符个数多余8个时,会重复进中断的OnCommMscomm()的处理对策
- delphi中常用字符处理函数(系统未提供的)
- 【Windows 核心编程】Windows 核心编程 -- 字符和字符串处理
- 关于delphi中url文件下载编码问题(处理里面含有空格,汉字,字符)
- Delphi编程--将字符转换为unicode编码
- Windows编程-1-字符和字符串处理相关知识点总结
- windows核心编程心解--字符和字符串处理
- windows编程中字符和字符串的处理
- Windows SDK编程(Delphi版) 之 消息处理
- shell 编程中的特殊字符的处理
- 串的处理 在实际的开发工作中,对字符串的处理是最常见的编程任务。本题目即是要求程序对用户输入的串进行处理。具体规则如下: 1. 把每个单词的首字母变为大写。 2. 把数字与字母之间用下划线字符(_)分
- (Delphi中处理字符串)截取中文字符和英文字符,去除所有数字
- Linux Shell编程-字符截取和处理命令
- Delphi经典实例11------特殊字符处理
- Delphi的字符处理
- Linux下与字符处理有关的编程小结
- DELPHI 数学函数+字符处理函数
- 读[编程之法:面试与算法心得](字符处理)