length property

int 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):

'Dart'.length; // 4 'Dart'.runes.length; // 4

var clef = '\u{1D11E}'; clef.length; // 2 clef.runes.length; // 1

Implementation

int get length;