# write method

1. @override

Future<void> write(

1. String str, [
2. int off = 0,
3. int? len

])
override

Writes a string to the buffer.

This method writes the characters of the string to the buffer. If the buffer becomes full during writing, it will be automatically flushed.

## Implementation

    @override
    Future<void> write(String str, [int off = 0, int? len]) async {
      len ??= str.length - off;
      for (int i = 0; i < len; i++) {
        await writeChar(str.codeUnitAt(off + i));
      }
    }