writeToSlot abstract method
Writes text into slot slot, reallocating if the current capacity is
insufficient for the UTF-8 encoded length.
Always null-terminates the written string.
Implementation
P writeToSlot(int slot, String text, [int? bufferSize]);