📜  dart 添加两个字符串 - Dart 代码示例

📅  最后修改于: 2022-03-11 14:48:04.477000             🧑  作者: Mango

代码示例1
// There are 3 ways to concatenate strings

String a = 'a';
String b = 'b';

var c1 = a + b; // + operator
var c2 = '$a$b'; // string interpolation
var c3 = 'a' 'b'; // string literals separated only by whitespace are concatenated automatically
var c4 = 'abcdefgh abcdefgh abcdefgh abcdefgh' 
         'abcdefgh abcdefgh abcdefgh abcdefgh';