fill current line with a character. max is ignored if max==0
number of cells written
See Implementation
fill current line with a character. max is ignored if max==0