var clef = '\u{1D11E}';
clef.length; // 2
clef.runes.length; // 1
== 等号操作符
检查每个...API源码:
bool operator ==(Object other);
compareTo
作用: 比较字符串是否相,返回整型,0相等,-1不相等。...XX字符串结尾
API源码:
bool endsWith(String other);
例子:
'Dart'.endsWith('t'); // true
startsWith
作用: 判断字符串是否已...start]);
同理 indexOf 只是会选择最后一个匹配的位置
isEmpty 和 isNotEmpty
作用: 判断字符串是否是空
API源码:
/// Whether this string...0002, 0003, 0004, 0005, 0006, 0007, 0008, 0009, 0010, 0011, 0012, 0013, 0014, 0015,...]
contains
作用: 判断字符串是否包含子字符串或者正则