Tutorial by Examples

You can use the plus (+) operator to concatenate strings: 'Dart ' + 'is ' + 'fun!'; // 'Dart is fun!' You can also use adjacent string literals for concatenation: 'Dart ' 'is ' 'fun!'; // 'Dart is fun!' You can use ${} to interpolate the value of Dart expressions within strings. The curly...
A string can be either single or multiline. Single line strings are written using matching single or double quotes, and multiline strings are written using triple quotes. The following are all valid Dart strings: 'Single quotes'; "Double quotes"; 'Double quotes in "single" quo...
Programmatically generating a String is best accomplished with a StringBuffer. A StringBuffer doesn't generate a new String object until toString() is called. var sb = new StringBuffer(); sb.write("Use a StringBuffer"); sb.writeAll(["for ", "efficient ", "stri...

Page 1 of 1