Writes string to this buffer at offset according to the character encoding. Returns number of bytes written.
offset
encoding
external int write(String string, [int offset, int length, String encoding]);