|
字符串函数大全(47) CheckBox1.Checked := TryStrToDateTime(Edit1.Text, vDateTime); Edit2.Text := DateTimeToStr(vDateTime); end; ///////End TryStrToDateTime ━━━━━━━━━━━━━━━━━━━━━ 首部 procedure DateTimeToString(var Result: string; const Format: string; DateTime: TDateTime); $[SysUtils.pas 功能 用指定的格式Format来格式化日期时间DateTime并返回到字符串Result中 说明 <参见FormatDateTime> 参考 function System.SetString 例子 <参见FormatDateTime> ━━━━━━━━━━━━━━━━━━━━━ 首部 function GetLocaleStr(Locale, LocaleType: Integer; const Default: string): string; platform; $[SysUtils.pas 功能 返回当前系统指定参数的字符串值 说明 GetLocaleStr(GetThreadLocale, LOCALE_SLANGUAGE, '') = '中文(中国)' 参考 function Windows.GetLocaleInfo 例子 Edit1.Text := GetLocaleStr(GetThreadLocale, SpinEdit1.Value, '<NULL>'); ━━━━━━━━━━━━━━━━━━━━━ 首部 function GetLocaleChar(Locale, LocaleType: Integer; Default: Char): Char; platform; $[SysUtils.pas 功能 返回当前系统指定参数的字符值 说明 GetLocaleChar(GetThreadLocale, LOCALE_STHOUSAND, #0) = ',' 参考 function Windows.GetLocaleInfo 例子 Edit1.Text := GetLocaleChar(GetThreadLocale, LOCALE_SLANGUAGE, #0); ━━━━━━━━━━━━━━━━━━━━━ 首部 function ByteType(const S: string; Index: Integer): TMbCSByteType;
|