常用字符串处理函数 Delphi
2013-04-22 13:58
423 查看
TStrings类的继承关系为:TObject-TPersistent
常用的字符串处理函数
函数名 语法 功能
AnsiCompareStr function AnsiCompareStr(const S1, S2: string): Integer; 用于比较两个大小写敏感的字符串
AnsiCompareText function AnsiCompareText(const S1, S2: string): Integer; 用于比较两个大小写不敏感的字符串
AnsiUpperCase function AnsiUpperCase(const S: string): string; 将字符串转换为全部大写
AnsiLowerCase function AnsiLowerCase(const S: string): string; 将字符串转换为全部小写
Appendstr procedure AppendStr(var Dest: string; const S: string); deprecated; 将给定字符串常量添加到目标字符串末尾
CompareStr function CompareStr(const S1, S2: string): Integer; 用于比较两个大小写敏感的字符串,其结果与区域设置无关
CompareText function CompareText(const S1, S2: string): Integer; 用于比较两个大小写不敏感的字符串,其结果与区域设置无关
Concat function Concat(s1 [, s2,..., sn]: string): string; 将一组字符串连接起来
Copy function Copy(S; Index, Count: Integer): string; 返回字符串的子串
Delete procedure Delete(var S: string; Index, Count:Integer); 从字符串中删除一个子串
Insert procedure Insert(Source: string; var S: string; Index: Integer); 在字符串的指定位置插入一个子串
Length function Length(S): Integer; 返回字符串中中字符的个数
Pos function Pos(Substr: string; S: string): Integer; 在字符串中搜索子串,返回的是索引值
LeftStr function LeftStr(const AText: AnsiString; const ACount: Integer): AnsiString; 返回从字符串左边开始指定长度的子串
RightStr function RightStr(const AText: AnsiString; const ACount: Integer): AnsiString; 返回从字符串末尾向前指定长度的子串
InttoStr function IntToStr(Value: Integer): string; 将整数转换为字符串
StrtoInt function StrToInt(const S: string): Integer; 将字符串转换为整数
LowerCase function LowerCase(const S: string): string; 转换为小写
UpperCase function UpperCase(const S: string): string; 转化为大写
Val procedure Val(S; var V; var Code: Integer); 将字符串的值转换为其数字表示式
常用的字符串处理函数
函数名 语法 功能
AnsiCompareStr function AnsiCompareStr(const S1, S2: string): Integer; 用于比较两个大小写敏感的字符串
AnsiCompareText function AnsiCompareText(const S1, S2: string): Integer; 用于比较两个大小写不敏感的字符串
AnsiUpperCase function AnsiUpperCase(const S: string): string; 将字符串转换为全部大写
AnsiLowerCase function AnsiLowerCase(const S: string): string; 将字符串转换为全部小写
Appendstr procedure AppendStr(var Dest: string; const S: string); deprecated; 将给定字符串常量添加到目标字符串末尾
CompareStr function CompareStr(const S1, S2: string): Integer; 用于比较两个大小写敏感的字符串,其结果与区域设置无关
CompareText function CompareText(const S1, S2: string): Integer; 用于比较两个大小写不敏感的字符串,其结果与区域设置无关
Concat function Concat(s1 [, s2,..., sn]: string): string; 将一组字符串连接起来
Copy function Copy(S; Index, Count: Integer): string; 返回字符串的子串
Delete procedure Delete(var S: string; Index, Count:Integer); 从字符串中删除一个子串
Insert procedure Insert(Source: string; var S: string; Index: Integer); 在字符串的指定位置插入一个子串
Length function Length(S): Integer; 返回字符串中中字符的个数
Pos function Pos(Substr: string; S: string): Integer; 在字符串中搜索子串,返回的是索引值
LeftStr function LeftStr(const AText: AnsiString; const ACount: Integer): AnsiString; 返回从字符串左边开始指定长度的子串
RightStr function RightStr(const AText: AnsiString; const ACount: Integer): AnsiString; 返回从字符串末尾向前指定长度的子串
InttoStr function IntToStr(Value: Integer): string; 将整数转换为字符串
StrtoInt function StrToInt(const S: string): Integer; 将字符串转换为整数
LowerCase function LowerCase(const S: string): string; 转换为小写
UpperCase function UpperCase(const S: string): string; 转化为大写
Val procedure Val(S; var V; var Code: Integer); 将字符串的值转换为其数字表示式
相关文章推荐
- Delphi中常用字符串处理函数
- Delphi中常用字符串处理函数
- Delphi中常用字符串处理函数
- Delphi中常用字符串处理函数
- [delphi技术]常用的几个字符串处理函数
- 常用字符串处理函数总结
- 常用的字符串处理函数
- 常用字符串处理函数与数组与指针
- 几个常用的JavaScript字符串处理函数 - split()、join()、substring()和indexOf()
- c语言中常用的字符串处理函数
- 举例说明常用字符串处理函数
- [总结] C字符串常用处理函数
- 处理PHP中字符串的常用操作及函数
- PHP常用字符串处理函数与ASP对照
- Delphi字符串操作的常用函数二
- 常用的字符串处理函数
- php中常用的处理字符串的函数
- string.h中常用字符串处理函数
- NSString常用的字符串处理函数