Dart-programming-string-property-length

提供:Dev Guides
2020年6月23日 (火) 01:14時点におけるMaintenance script (トーク | 投稿記録)による版 (Imported from text file)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先:案内検索

文字列プロパティの長さ

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

構文

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