writeEnclosed method
Adds object
, enclosed by enclosing
, to this buffer.
final buffer = StringBuffer()..writeEnclosed('hello world');
buffer.toString(); // "'hello world'"
Implementation
void writeEnclosed([Object? object, String enclosing = "'"]) => this..write(enclosing)..write(object)..write(enclosing);