|
字符串函数大全(50) 首部 function CharLength(const S: String; Index: Integer): Integer; $[SysUtils.pas 功能 返回字符串中指定位置的字符宽度 说明 CharLength('English汉', 1) = 1;CharLength('English汉', 8) = 2 参考 function System.Assert;function SysUtils.StrCharLength 例子 SpinEdit1.Value := CharLength(Edit1.Text, SpinEdit2.Value); ━━━━━━━━━━━━━━━━━━━━━ 首部 function NextCharIndex(const S: String; Index: Integer): Integer; $[SysUtils.pas 功能 返回下一个字符的位置 说明 CharLength('你好', 1) = 3;CharLength('你好', 3) = 5 参考 function System.Assert;function SysUtils.StrCharLength 例子 SpinEdit1.Value := NextCharIndex(Edit1.Text, SpinEdit2.Value); ━━━━━━━━━━━━━━━━━━━━━ 首部 function IsPathDelimiter(const S: string; Index: Integer): Boolean; $[SysUtils.pas 功能 返回字符串S中指定位置Index上是否是一个路径分隔符 说明 IsPathDelimiter('C:\Windows', 3) = True 参考 const SysUtils.PathDelim;function SysUtils.ByteType 例子 CheckBox1.Checked := IsPathDelimiter(Edit1.Text, SpinEdit1.Value); ━━━━━━━━━━━━━━━━━━━━━ 首部 function IsDelimiter(const Delimiters, S: string; Index: Integer): Boolean; $[SysUtils.pas 功能 返回字符串S中指定位置Index上是否是一个分隔符Delimiters 说明 IsDelimiter('@', 'wjhu111@21cn.com', 8) = True
|