Delphi XE6 TStringHelper中的string类型转换
生活随笔
收集整理的這篇文章主要介紹了
Delphi XE6 TStringHelper中的string类型转换
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
類型轉換:
function ToBoolean: Boolean; function ToInteger: Integer; function ToSingle: Single; function ToDouble: Double; function ToExtended: Extended;class function ToBoolean(const S: string): Boolean; class function ToInteger(const S: string): Integer; class function ToSingle(const S: string): Single; class function ToDouble(const S: string): Double; class function ToExtended(const S: string): Extended;class function Parse(const Value: Integer): string; class function Parse(const Value: Int64): string; class function Parse(const Value: Boolean): string; class function Parse(const Value: Extended): string; //-------------------------------------------------------------------------------- varS: string;str: string;n: Integer;b: Boolean;f: Double; beginstr := S.Parse(123);n := str.ToInteger;? // 123b := str.ToBoolean;? // Truestr := S.Parse(True);b := str.ToBoolean;? // Truen := str.ToInteger;? // -1str := S.Parse(3.14159260000);f := str.ToDouble;? //3.1415926 end;
轉載于:https://www.cnblogs.com/GodPan/p/3700732.html
總結
以上是生活随笔為你收集整理的Delphi XE6 TStringHelper中的string类型转换的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: javascript模拟鼠标双击事件
- 下一篇: Flappy bird需求规格说明书