Dart シングルクォーテーションで複数行の文字列を使用する方法
環境
OS windows10 Home 64bit
Dart 2.18.4
構文
''' text text '''
「”’(シングルクォーテーション3つ)」を使って複数行の文字列を使用します。
使用例
void main() {
String str = '''study
skill
smart''';
print(str);
}
実行結果
study skill smart
Coding Changes the World
環境
OS windows10 Home 64bit
Dart 2.18.4
構文
''' text text '''
「”’(シングルクォーテーション3つ)」を使って複数行の文字列を使用します。
使用例
void main() {
String str = '''study
skill
smart''';
print(str);
}
実行結果
study skill smart