length property
int
get
length
The length of the string.
Returns the number of UTF-16 code units in this string. The number of runes might be fewer if the string contains characters outside the Basic Multilingual Plane (plane 0):
文字列の長さを返します。
この文字列の UTF-16 コード単位の数を返します。 文字列に Basic Multilingual Plane (プレーン 0) 以外の文字が含まれている場合、runes の数は少なくなる可能性があります。
'Dart'.length; // 4
'Dart'.runes.length; // 4
var clef = '\u{1D11E}';
clef.length; // 2
clef.runes.length; // 1
Returns 0
if itself is Null.
自身がNullの場合0
を返します。
Implementation
int get length {
if (this == null) {
return 0;
}
return this!.length;
}