一个很有用的DELPHI字符操作函数
2011-02-22 16:28
393 查看
Unit
SysUtils
LastDelimiter(const Delimiters, S: string): Integer;
Returns the byte index of the last character that matches any character in a specified set of delimiters.
Delimiters:指定的分割符,可以是多个。
S:源字符串。
For example:
LastDelimiter('/*','123/567*/abc.txt') = 9;
remark:最后出现的分隔符号是“/”,位置是9。
LastDelimiter('./*)(','123/567/abc.txt') = 12;
remark:最后出现的分隔符号是“.”,位置是12。
SysUtils
LastDelimiter(const Delimiters, S: string): Integer;
Returns the byte index of the last character that matches any character in a specified set of delimiters.
Delimiters:指定的分割符,可以是多个。
S:源字符串。
For example:
LastDelimiter('/*','123/567*/abc.txt') = 9;
remark:最后出现的分隔符号是“/”,位置是9。
LastDelimiter('./*)(','123/567/abc.txt') = 12;
remark:最后出现的分隔符号是“.”,位置是12。
相关文章推荐
- //4. 编写一个函数reverse_string(char * string)(递归实现) //实现:将参数字符串中的字符反向排列。 //要求:不能使用C函数库中的字符串操作函数。
- Delphi:字符操作函数--生成指定个数的字符(串)
- C语言 编写一个函数reverse_string(char * string) 实现:将参数字符串中的字符反向排列。 要求:不能使用C函数库中的字符串操作函数。
- 通过编写一个程序,来说明字符数组 以及操作字符数组的函数的用法。该程序读入一组文本行,并把最长的文本行打印出来。
- 编写一个函数reverse_string(char * string) 实现:将参数字符串中的字符反向排列。 要求:不能使用C函数库中的字符串操作函数
- 一个非常非常非常基础的程序,写的不好,但是一般的文件读写操作及字符处理函数都涉及到了..新手学习用的
- 编写一个函数reverse_string(char * string)(递归实现) 实现:将参数字符串中的字符反向排列。 要求:不能使用C函数库中 的字符串操作函数。
- 编写一个函数reverse_string(char * string)(递归实现)实现:将参数字符串中的字符反向排列。要求:不能使用C函数库中的字符串操作函数。
- Delphi 的内存操作函数(1): 给字符指针分配内存
- 【c语言】编写一个函数reverse_string(char * string) 实现:将参数字符串中的字符反向排列。 要求:不能使用C函数库中的字符串操作函数
- Delphi 的内存操作函数(1): 给字符指针分配内存
- Delphi 的内存操作函数(1): 给字符指针分配内存
- Delphi 的内存操作函数(1): 给字符指针分配内存
- Delphi 的内存操作函数(1): 给字符指针分配内存( 给字符指针(PChar、PWideChar、PAnsiChar)分配内存最佳的选择是StrAlloc。分配内存的时候会对字符串进行初始化)
- 《Delphi 算法与数据结构》学习与感悟[5]: 定位一个字符位置时, Pos 函数为什么不是最快的?
- 编写一个函数reverse_string(char * string) 实现:将参数字符串中的字符反向排列。 要求:不能使用C函数库中的字符串操作函数。
- 【C语言】编写一个函数reverse_string(char * string)(递归实现),将参数字符串中的字符反向排列,不能使用C函数库中的字符串操作函数。
- Delphi 的内存操作函数(1): 给字符指针分配内存
- Delphi 的内存操作函数(1): 给字符指针分配内存
- C语言 编写一个函数,将参数字符串中的字符反向排列。要求:不能使用C函数库中的字符串操作函数,