Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

alternate of string class in dart

var sb = StringBuffer();
sb
  ..write('Use a StringBuffer for ')
  ..writeAll(['efficient', 'string', 'creation'], ' ')
  ..write('.');

var fullString = sb.toString();

assert(fullString ==
    'Use a StringBuffer for efficient string creation.');
Source by dart.dev #
 
PREVIOUS NEXT
Tagged: #alternate #string #class #dart
ADD COMMENT
Topic
Name
9+8 =