Next: insert_char Up: Change buffer contents Previous: delete_char

### replace_char

`void replace_char(int newchar);`

Replaces the current character by newchar. At the end of file or if the file is empty the new character is inserted at the current position and the buffer size is incremented. Obviously the number of lines of the buffer is updated if one of the current or the new character is newline. Its definition is equivalent to: