Answers for "dart code to combine two strings"

2

dart add two strings

// 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';
Posted by: Guest on August-27-2021

Code answers related to "Dart"

Browse Popular Code Answers by Language