Dart-programming-string-property-length

提供:Dev Guides
移動先:案内検索

文字列プロパティの長さ

スペース、タブ、改行文字を含む文字列の長さを返します。

構文

String.length

void main() {
   String str = "Hello All";
   print("The length of the string is: ${str.length}");
}

次の output -が生成されます。

The length of the string is: 9