2
【笔记】Dart 数据类型转换
source link: https://loli.fj.cn/2023/08/14/Dart%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%E8%BD%AC%E6%8D%A2/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
【笔记】Dart 数据类型转换
2023-08-14 2023-08-16
Dart 数据类型转换
字符串类型转换为整型
<str>
:字符串数据
int num = int.parse(<str>);
字符串类型转换为浮点型
<str>
:字符串数据
double num = double.parse(<str>);
数值型转换为字符串
num
:数值型(整型、浮点型)数据
String str = num.toString();
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK