Open zhaobinglong opened 3 years ago
'https://' + network + '.infura.io/‘,
// 去除左右两边空格
print(a11.trim());//aab bcc 去除左右两边空格
// 去除右边空格
print(a11.trimRight());// aab bcc 去除右边空格
// 去除左边空格
print(a11.trimLeft());// aab bcc //去除左边空格
// 字符串json转对象 Map result = jsonDecode(rsp.body); print('name body => ${result['result']}’);
// 在字符串中插入变量 'rsp body => ${rsp.body}’
// 替换第一次出现的指定字符串 print(url.replaceFirst("t", "A")); //替换第一次出现t字符位置的字符
// 获取一个字符串的十进制表示 // 输出字符串的Unicode编码 ’this is code'.codeUnits; // [68, 97, 114, 116]
// 截取从0开始,到64停止的字符串 a.substring(0,64)
// 截取小数点后的字符串
// 把16进制的字符串转为10进制的数字 int.parse(code, radix: 16);
// 把10进制转16进制
// 大小写转换 print(a.toLowerCase()); print(a.toUpperCase());
var a = 'hello world';
print(a.contains('wo')); //true
print(a.startsWith('h')); //true
print(a.endsWith('d')); //true
print(a.indexOf('llo')); //2
// 判断字符串为空 name.isEmpty
基本数据类型
Number数字、 String字符串、 Boolean布尔、 List数组、 Map集合、 symbol符号;
申明数据
数据类型判断
语法糖